Skip to content

Instantly share code, notes, and snippets.

@srinathweb
Forked from saisurya-kat/Rest-Must.md
Created July 16, 2018 04:16
Show Gist options
  • Save srinathweb/7fd11e1893d2331b12c33e880b5234ba to your computer and use it in GitHub Desktop.
Save srinathweb/7fd11e1893d2331b12c33e880b5234ba to your computer and use it in GitHub Desktop.
Everything about REST REST REST

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment