In this chapter, you will learn how to create RESTful Web Services with the new integrated management of Yii 2.
You will learn how to create a new application to manage the api
environment and how to create a controller using the default base classes provided by the framework.
Then, we will cover authentication methods and you'll learn how to customize the response output format. We'll also discuss:
Configuring the REST app in the advanced template
Creating a controller:
For example: creating a controller to manage rooms
Authentication:
For example: using authentication to get a customers list
New controller actions:
For example: getting a rooms list for a reservation
Customizing authentication and the response
For example: status response node in received data
Other forms of export – RSS:
For example: creating RSS with a list of available rooms