# RESTful APIs RESTful APIs, or REST (Representational State Transfer) is a software architectural style allowing the requesting systems to access and manipulate textual representation of Web resources by using a uniform and predefined set of stateless operations. ## Architectural Constraints ### Client-Server Architecture Separating the UI concerns from the data storage concerns improves * Portability of UI across multiple platforms * Scalability (by simplifying the server components) ### Statelessness Session states are not stored on the server, but maintained by and sent from the client. ### Cacheability Improve scalability and performance by caching appropriately. ### Layered System Improve performance (via caching) and security by intermediary servers. ### Code on Demand (optional) Transfer executable code. ### Uniform Interface * Resource identification in requests * Resource manipulation through representation * Self-descriptive messages * Hypermedia as the engine of application state ## The API ### URI Base URI to collection resource, e.g. http://api.example.com/collection/ Member resource: http://api.example.com/collection/item42 ### HTTP methods * GET: retrieve resource representation * POST: create member resource * PUT: replace representation of resources * PATCH: update resource representation * DELETE: delete resource representation