Skip to content
Getting Digital

REST API

Also: REST, RESTful API, web API, API design, resource-oriented API

A REST API exposes an application's data as resources at stable addresses and lets clients read and change them with HTTP's standard methods and status codes, so that the protocol itself carries most of the meaning.

Our take. Almost nothing called REST is REST as its author defined it, and that is fine. The useful discipline is smaller than the doctrine: resources as nouns at stable addresses, HTTP methods used for what they mean, status codes that tell the truth, and a schema the client can read before calling. An API with those four properties is good whatever it is called, and one without them is bad even with the label.

The idea came from a doctoral thesis describing why the web scaled: addressable resources, a uniform interface, stateless requests, cacheable responses, and responses that tell the client what it can do next. Applied to APIs, most of that survived and the last part did not. A working REST API names its things as nouns in the path, uses GET to read them, POST to create, PUT or PATCH to change and DELETE to remove, returns the status code that describes what happened, and documents its shapes in a machine-readable schema. Clients call the addresses they were told about rather than discovering them from responses, which purists regret and nobody has changed.

The four properties worth insisting on

Resources are nouns at stable addresses, so a customer is at one place and stays there. Methods mean what HTTP says they mean, so a GET never changes anything and a PUT can be safely repeated. Status codes tell the truth, so a failure is a 4xx or 5xx and never a 200 with an error inside the body. And a published schema, in the OpenAPI format almost everyone has settled on, lets a client be generated and validated before the first call. An API with those four is a pleasure to integrate against; each one missing costs every consumer hours.

The alternatives answer different problems. GraphQL lets a client ask for exactly the fields it needs across related objects in one request, at the cost of a query language and a server that must guard against expensive queries. gRPC uses a binary encoding and generated code for fast, typed calls between services that both sides control. Neither replaces REST for the public, browser-facing, cache-friendly case, and most systems run REST at the edge and something else between their own services. The developer certifications examine the discipline directly: the AWS developer and Azure DevOps papers assume you can read an API definition, and the Cisco automation exam gives APIs a fifth of its weight.

  • Version in the path or a header, and never break an existing version; consumers you have never met depend on it.
  • Paginate lists, because the collection that fits in one response today will not next year.
  • Make writes idempotent where you can, so a client that retried after a timeout does not create two orders.
  • Rate-limit and say so, with a 429 and a header that says when to try again.
  • Return errors in one consistent shape, with a machine-readable code and a human-readable message, so every consumer handles them the same way.

In practice

A team ships an API in which every response is a 200 and the body contains a success flag, listing customers is at one address and fetching a customer at an unrelated one, creating an order uses GET with parameters, and the only documentation is a wiki page last edited before the second version. Every integrator writes special handling for the success flag, hard-codes the two unrelated addresses, and discovers the GET that creates orders when a monitoring tool that pre-fetches links creates four hundred of them overnight. The redesign changes little code and everything about the interface: customers and orders at predictable addresses, methods used as HTTP means them, honest status codes, and a generated schema. The next integrator is done in a day.

Often confused with

HTTP
HTTP is the protocol; REST is a disciplined way of using it to expose resources. Every REST API speaks HTTP, and most APIs that speak HTTP are only loosely RESTful, which is why the four properties above matter more than the label.
Serverless Computing
Serverless is a way of running code without managing servers, and a common way to host an API. REST is a way of designing the API's interface. One is about where the code runs; the other is about what the interface promises.
Web Server
A web server receives HTTP requests; an API is a contract about what those requests may ask for and what comes back. The same server can serve a website and a REST API from different paths.

Key takeaways

  • Nouns at stable addresses, methods as HTTP means them, truthful status codes, a published schema.
  • The doctrine's last constraint is widely ignored; the four properties are not optional.
  • GraphQL and gRPC solve different problems; REST stays at the public edge.

Certifications that test this

Vendor exams whose syllabus covers this concept — facts, cost and a preparation path on each page.

More courses from these shelves

A rotating selection from the course directory, drawn from the subcategories where this concept is taught rather than picked for it. Details, price and the provider link are on the course page.

Complete Full Stack Development with MERN

Course Description:Get ready to embark on an exciting journey into the world of full-stack web development. Welcome to…

Udemy

Python for Complete Beginners Create Mini Games

Welcome to the course: Python for Complete Beginners Create Mini GamesMost beginners study core part of the programming…

Udemy

Next. js & Laravel 11 Build a Modern Full-Stack Application

Next.js & Laravel 11 Build a Modern Full-Stack ApplicationUnlock the power of modern web development with Next.js and L…

Udemy

Solid Principle with real world and live coding example

It's essential to understand the foundational ideas behind SOLID. Writing good code will come naturally to you once you…

Udemy

Portfolio Project: Blogging App with Nest JS

Are you ready to take your NestJS skills to the next level by building a complete, real-world application from scratch?…

Udemy

Complete JavaScript Full Stack Course 2025 From A - Z

JavaScript is the most popular programming language for both front-end and back-end web development. Applications for J…

Udemy

FAQ

Is REST a standard?
No. It is an architectural style described in a thesis, and REST API is a conventional name for HTTP APIs that follow its main ideas. The nearest thing to a standard is the OpenAPI schema format most such APIs are documented in.
REST or GraphQL?
REST for public, cache-friendly, resource-shaped interfaces and for anything a browser or a CDN will call directly. GraphQL when clients need flexible, cross-object queries and you can afford to guard the server against expensive ones. Many systems use both, in different places.
Why does it matter that GET must not change anything?
Because everything between the client and the server assumes it: browsers pre-fetch, proxies cache, monitoring tools crawl. A GET that creates or deletes will be triggered by things that are not users, and the resulting damage is the classic API horror story.

Sources

The primary text this definition rests on. Read it before you trust ours.

  • Fielding, R. T., Architectural Styles and the Design of Network-based Software Architectures (2000)
  • RFC 9110, HTTP Semantics (2022)
  • OpenAPI Initiative, OpenAPI Specification v3.1 (2021)

Last reviewed 13 September 2026 · Getting Digital