Glossary termAPI design style

REST API

Also known as: RESTful API, REST, Representational state transfer

Web interface that follows the REST architectural style, exposing resources at URLs that clients manipulate with stateless HTTP requests.

A REST API is an application programming interface designed according to REST, short for representational state transfer, an architectural style for networked systems. Data and functionality are modeled as resources, each identified by a URL, such as a particular customer or order. Clients act on these resources with standard HTTP methods: GET to retrieve, POST to create, PUT or PATCH to update and DELETE to remove. Responses carry representations of the resource, most often in JSON, along with status codes that report success or failure.

Roy Fielding defined REST in his 2000 doctoral dissertation at the University of California, Irvine, drawing on his work on the HTTP standards. He described a set of constraints, including a separation of client and server, stateless requests in which each message carries everything needed to understand it, cacheable responses, a layered system and a uniform interface. In his account, hypermedia links in responses should guide clients through the application's possible states. Many APIs described as RESTful adopt resource URLs and HTTP verbs but skip hypermedia, a gap Fielding himself has criticized.

REST became the dominant style for public web APIs in the 2000s and 2010s because it reuses existing web infrastructure, such as URLs, HTTP caching and proxies, and can be called from almost any language. Description formats maintained by the OpenAPI Initiative help document these APIs and generate client code for them. Alternatives address its limits: GraphQL lets clients request exactly the fields they need in a single query, while gRPC and WebSocket connections suit high-performance or real-time communication.

Key points

  • Roy Fielding defined REST in his 2000 doctoral dissertation as a set of architectural constraints for networked systems.
  • Resources are identified by URLs and manipulated with standard HTTP methods such as GET, POST, PUT and DELETE.
  • Statelessness means each request carries all the information the server needs, which simplifies scaling and caching.
  • Many so-called RESTful APIs omit the hypermedia constraint that Fielding considered essential to the style.

From the source

A REST API is an application programming interface (API) that follows the design principles of the REST architectural style. REST is short for representational state transfer, and is a set of rules and guidelines about how you should build a web API.

Source: Red Hat (opens in a new tab)

Related entries

Glossary term

API

Programming

Defined set of rules and interfaces through which one piece of software can request services or data from another without knowing its internals.

Glossary term

HTTP

ProgrammingCybersecurity

Stateless request-response protocol that web browsers, servers and other clients use to request and transfer resources such as web pages and data.

Person

Roy Fielding

Programming

American computer scientist who defined the REST architectural style, co-authored the HTTP specifications and co-founded the Apache HTTP Server project.

Glossary term

GraphQL

Programming

Query language and runtime for APIs that lets clients request exactly the data they need from a server in a single, strongly typed query.

Glossary term

JSON

Programming

Lightweight, text-based data interchange format that represents structured data as nested objects and arrays, derived from JavaScript syntax.

Glossary term

Webhook

ProgrammingAI

HTTP callback in which one system automatically sends data to another the moment a specific event occurs, instead of waiting to be asked.

Organization

Linux Foundation consortium that maintains the OpenAPI Specification, a vendor-neutral standard for describing HTTP APIs in machine-readable form.

Glossary term

Idempotence

ProgrammingDevOps

Property of an operation that produces the same result whether it is applied once or many times, important for safe retries and automation.

Featured in guides

Referenced by

Other entries that discuss or point to REST API.