Understanding RESTful APIs
The term REST is an acronym for REpresentational State Transfer, which is an architectural style for creating web services that comply with a set of rules and constraints. REST only uses a subset of the HTTP protocol standard, so is quite popular among the developer community for building backend services that offer flexibility in the way data (resources) can be accessed.
As we discussed in Chapter 3, Architecture Principles and API Styles, a REST-based architecture system can be visualized as having two parts; namely, the client, who requests the resources, and the server, which has the resources:
Note
When using REST APIs, different data formats are supported, such as XML, YAML, or any other machine-readable format. However, JSON is the most preferred and commonly used format.
HTTP-based web services that adhere to the REST guidelines are known as RESTful APIs. These APIs use...