REST (Representational State Transfer)

Summary: A design philosophy for web services that builds upon the principles of HTTP.

Sources: chapter4

Last updated: 2026-04-15


REST is not a protocol, but a design philosophy. It emphasizes simple data formats, using URLs to identify resources and leveraging HTTP features (e.g., cache control, authentication, and content-type negotiation).

Characteristics

  • RESTful: An API designed according to the principles of REST.
  • Data Formats: Predominantly uses JSON for responses.
  • Compatibility: Usually achieved by adding optional request parameters and new fields to response objects.
  • Tooling: Broad ecosystem of tools (caches, load balancers, proxies) because it adheres to HTTP standards.

Advantages over RPC

  • Experimental & Debuggable: Requests can be made with simple tools like curl or a browser.
  • Decoupled: REST doesn’t try to hide the fact that it is a network protocol.