REST - Representational State Transfer is intended to evoke an image of how a well-designed web application behaves.
- Facts of REST
- REST is not a standard/protocol its an architectural style
- REST is protocol agnostic
- JSON is not part of REST
- HTTP is also not part of REST
- 6 REST Constraints
- Client - Server Architecture : Client and server are separated and can evolve separately.
- Statelessness : state is contained with in the request
- Cacheable : each response message must explicitly state if it can be cached or not
- Layered System : Client cannot tell what layer its connected to
- Code on Demand(Optional) : server can extend client functionally
- Uniform Interface : API and consumers share one single,technical interface:URI, Method, Media Type
- 10 Best Practices of REST
- Pricinciple of good Rest Design
- Same as above
Important things to learn along with usual Endpoint implementation.
- Validation and logging
- HATEOAS
- Media Types
- Protecting and documenting
- Pagination, Sorting, Filtering, Data Shaping
- Versioning, Caching and handling concurrency
Assess Maturity of API using Richardson Maturity Model