Best Practices for REST API interface design
This post contains some notes about REST and best practices that I follow to design RESTful APIs, it will focus mainly on Uniform interface constraint. REST REST (REpresentational State Transfer) is an architectural approach to design web services presented by Roy Fielding in 2000 in his dissertation . A RESTful API is an API that satisfies the REST constraints. Constraints Client-server - Separate client application and server application, It’s about separation of concerns, by doing this we improve portability and scalability because it allows those components to evolve independently. Stateless - Each request from a client to server must contain all necessary information, including authentication details, the server cannot store anything about requests, sessions, history, etc. Cache - When possible responses data have to be cacheable, clients have the right to reuse responses data later. This will improve efficiency and scalability, the trade-off, however, is that it can decreas