What is a REST API? Concepts, methods, and examples
A REST API is a way for two systems to exchange data over HTTP using a small set of standard methods, where each piece of data is treated as a resource with its own address. REST stands for Representational State Transfer, an architectural style defined by Roy Fielding in 2000. This guide gives a plain definition, maps the HTTP verbs you will actually use, walks through one request and response, and shows where REST fits next to other API styles.

The short version
- REST is an architectural style, not a protocol or a product. It describes how systems should exchange data over HTTP, and APIs that follow it are called RESTful.
- Everything is a resource with its own URL. You act on a resource by sending an HTTP method to its address, and the server returns a representation, usually JSON.
- Five methods cover most work: GET reads, POST creates, PUT replaces, PATCH partially updates, and DELETE removes. GET, PUT, and DELETE are idempotent; POST is not.
- REST is stateless. Each request carries everything the server needs, so the server keeps no session memory between calls, which makes REST easy to scale and cache.
- REST suits straightforward CRUD APIs. GraphQL lets clients shape one query to avoid over-fetching, and SOAP is an older protocol built around operations rather than resources.
What a REST API is
A REST API is an application programming interface that lets two systems exchange data over HTTP by treating each item of data as a resource with its own URL. REST stands for Representational State Transfer, an architectural style Roy Fielding defined in his 2000 doctoral dissertation. A client requests a resource, and the server returns a representation of its current state, most often as JSON. APIs that follow these rules are described as RESTful.
REST is a set of constraints rather than a strict specification. Fielding describes six that together make a system RESTful, and most teams treat the first few as the ones that matter day to day.
- Client-server: the client and the server are separate and evolve independently.
- Stateless: each request carries all the context it needs, so the server stores no session state between calls.
- Cacheable: responses say whether they can be stored, so clients and intermediaries can reuse them.
- Uniform interface: resources are identified by URLs and acted on through a standard, predictable set of methods.
- Layered system: proxies, gateways, and load balancers can sit between client and server without either side knowing.
- Code on demand: the server may optionally send executable code to the client, the only constraint that is not required.
If you want the broader picture of how interfaces connect software, start with our explainer on what an API is, then return here for the REST specifics.
The HTTP methods a REST API uses
A REST API maps actions to standard HTTP methods, also called verbs. The five you will use most are GET to read a resource, POST to create one, PUT to replace one, PATCH to update part of one, and DELETE to remove one. The method tells the server what you intend to do, and the URL says which resource you mean. The table below summarizes each verb with a short example.
| Method | What it does | Example |
|---|---|---|
| GET | Reads a resource; safe and idempotent | GET /users/42 |
| POST | Creates a new resource; not idempotent | POST /users |
| PUT | Replaces a resource in full; idempotent | PUT /users/42 |
| PATCH | Updates part of a resource | PATCH /users/42 |
| DELETE | Removes a resource; idempotent | DELETE /users/42 |
Two properties shape how these behave. A method is safe when it only reads and changes nothing, which is true of GET. A method is idempotent when sending it many times has the same effect as sending it once, which holds for GET, PUT, and DELETE but not for POST. Designing around these rules is part of how our teams approach custom software development so APIs stay predictable as they grow.
A simple request and response
A REST call has two halves. The request names a method, a URL, and headers, plus a body when you are sending data. The response returns a status code that reports the outcome and a body that carries the resource, usually as JSON. A successful read returns status 200, a successful create returns 201, and a missing resource returns 404. Below is a request to read user 42 and the response the server sends back.
The client sends a GET request to the resource address, asking for JSON:
| Part | Value |
|---|---|
| Request line | GET /users/42 HTTP/1.1 |
| Request header | Accept: application/json |
| Status | 200 OK |
| Response header | Content-Type: application/json |
| Response body | { "id": 42, "name": "Ada", "role": "admin" } |
To create a user instead, the client sends POST /users with a JSON body describing the new record, and the server replies 201 Created with the stored resource and its new URL. The same pattern, a method plus a URL plus an optional body, repeats across the whole API, which is what makes REST predictable to learn and to integrate.
REST vs other API styles
REST is one of several ways to design an API, and it remains the most widely used because it is simple to build, test, and cache. The main alternatives are GraphQL and SOAP. GraphQL is a query language that exposes a single endpoint and lets the client shape exactly what data comes back, which reduces over-fetching but adds caching and tooling work. SOAP is an older, stricter protocol organized around operations and XML messages, still common in enterprise and financial systems. The neutral rule is to match the style to the problem.
- REST: resources at many URLs, standard HTTP methods. Best for clear CRUD APIs that benefit from HTTP caching.
- GraphQL: one endpoint, client-defined queries. Useful when clients need varied, nested data and you want to avoid over-fetching.
- SOAP: operation-based protocol using XML and formal contracts. Common where strict standards and legacy systems apply.
REST's staying power is not theoretical. According to the Postman 2025 State of the API Report, which surveyed more than 5,700 developers and architects, REST remains the most widely adopted API architectural style, with adoption far ahead of GraphQL, WebSockets, and SOAP. Its simplicity and native fit with HTTP caching are the main reasons teams keep choosing it as their default.
For a deeper, hands-on comparison of the two modern styles, see our guide on REST vs GraphQL. If your team is building a web product or platform that needs a clean API layer, our web development practice designs and ships REST-based interfaces as a first-class part of the architecture. For AI-powered products with more complex data flows, the AI application development team applies the same discipline to the API contracts that connect models to clients.
REST API questions
What does REST stand for?
What is the difference between REST and a REST API?
Which HTTP methods does a REST API use?
What does it mean that a REST API is stateless?
What format does a REST API return?
When should I use REST instead of GraphQL or SOAP?
Sources
- MDN Web Docs, REST glossary entry (definition of Representational State Transfer).
- MDN Web Docs, HTTP request methods (GET, POST, PUT, PATCH, DELETE, safe and idempotent).
- Amazon Web Services, What is a RESTful API (the six REST constraints).
- Roy T. Fielding, Architectural Styles and the Design of Network-based Software Architectures, 2000 (origin of REST).
- Postman, 2025 State of the API Report (REST adoption across 5,700+ developers and architects).
Web & software
Backend Frameworks Comparison
A 2026 comparison of backend frameworks across Node, Django, Spring, Laravel, Go and more, by performance, ecosystem and...
Read guide →
Web & software
Django vs Flask: choosing a Python web framework
Django vs Flask: compare the two leading Python web frameworks on structure, scale, ORM, and learning curve. Expert guida...
Read guide →
Web & software
Healthcare technology trends
The healthcare technology trends that matter: AI in clinical workflows, FHIR interoperability, telehealth, wearables and...
Read guide →
Web & software
Laravel Core Concepts
What is Laravel? A PHP web framework with routing, Eloquent ORM, Blade, and queues built in. The core concepts explained...
Read guide →
Web & software
Next.js vs React
Next.js is a framework built on React, not a replacement. Compare server rendering, routing, and when to use each for you...
Read guide →
Web & software
REST vs GraphQL: which API style for your product
REST vs GraphQL compared across caching, versioning, and real-time. Clear verdict on which API architecture fits your pro...
Read guide →
Product & UX
AI in UX Design: How AI Is Changing User Experience
How AI is changing UX design: personalization, predictive flows, generative UI, and faster research, with concrete app ex...
Read guide →
Mobile & apps
App development tools
The app development tools you actually need, by category: IDEs, frameworks, backend and BaaS, testing, CI/CD, and design...
Read guide →
Mobile & apps
App Monetization Strategies: How to Make Money From Your App
App monetization strategies explained: subscriptions, freemium, in-app purchases, ads, and usage-based pricing, plus app...
Read guide →
