REST
REST, short for Representational State Transfer, is an architectural style for networked applications in which clients act on named resources by exchanging representations of them through a uniform, stateless interface. Roy Fielding defined it in his 2000 doctoral dissertation to capture the design principles behind the web, and it now shapes how most web APIs are designed.
A resource is any piece of information that can be named, such as a document, a user account, or a collection of orders. Each resource has an identifier, which on the web is a URL. Clients never touch a resource directly. They send and receive representations of it, such as an HTML page or a JSON document, and one resource can have several representations.
Fielding built the style by layering constraints onto a distributed system:
- Client-server: Separates the user interface from data storage, so each side can evolve independently.
- Stateless: Each request carries everything the server needs to process it, and the server keeps no session context between requests.
- Cacheable: Responses are labeled as cacheable or non-cacheable, so clients and intermediaries can safely reuse them.
- Uniform interface: Every resource is handled through the same generic operations and self-descriptive messages, which on the web means HTTP methods and media types. A media type, such as
application/json, labels the format of a message. - Layered system: Proxies, gateways, and load balancers can sit between client and server, and a client can’t tell whether it’s talking to the end server or an intermediary.
- Code on demand: Servers may optionally send executable code, such as scripts, to extend a client.
The uniform interface also expects responses to carry links to the actions and resources available next. This constraint is known as hypermedia as the engine of application state (HATEOAS). Statelessness and caching let a service scale by adding servers, at the cost of repeating context in every request.
In the widget below, a load balancer spreads requests across three servers. Compare how a server-side session and a stateless request each fare when the next call lands on a different server:
An API that follows these constraints is called RESTful. In everyday use, the label covers HTTP APIs that expose resources at URLs, map HTTP methods onto CRUD operations, and exchange JSON. Many of them skip hypermedia links, which Fielding has argued disqualifies them from the name.
Related Resources
Tutorial
Python and REST APIs: Interacting With Web Services
Learn to consume web services with the requests library, then explore the tools for building a Python REST API of your own.
For additional information on related topics, take a look at the following resources:
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Martin Breuss • Updated Nov. 20, 2026