Glossary

REST

TL;DR

REST (Representational State Transfer) is an architectural style for designing distributed systems that emphasizes scalability, simplicity, and interoperability through stateless communication and standard HTTP methods.


Concept

REST (Representational State Transfer) is an architectural style for designing networked applications, particularly web services, that was described by Roy Fielding in his 2000 doctoral dissertation. REST constrains software architecture to promote scalability, simplicity, and interoperability.

Key principles and constraints of REST include:

  1. Client-Server Architecture: Separation of concerns between user interface concerns (client) and data storage concerns (server), improving portability and scalability.

  2. Statelessness: Each client request to the server must contain all information needed to understand and process the request, with no server-side session state.

  3. Cacheability: Responses must define themselves as cacheable or non-cacheable to improve network efficiency and reduce latency.

  4. Uniform Interface: Simplification of the overall system architecture through a standardized interface consisting of:

    • Resource identification in requests
    • Resource manipulation through representations
    • Self-descriptive messages
    • Hypermedia as the engine of application state (HATEOAS)
  5. Layered System: Hierarchical layers of intermediaries (proxies, gateways, load balancers) can be introduced without changing client-server interactions.

  6. Code on Demand (Optional): Servers can temporarily extend client functionality by transferring executable code.

RESTful APIs typically use standard HTTP methods:

  • GET: Retrieve a resource
  • POST: Create a new resource
  • PUT: Update an existing resource
  • DELETE: Remove a resource
  • PATCH: Partially update a resource

Organizations use REST as the foundation for web APIs due to its simplicity, scalability, and compatibility with existing web infrastructure. It’s the dominant architectural style for public web APIs and forms the basis for many microservices architectures.

Related words: GraphQL API Gateway DNS