What is a REST API?
A REST API is a way for two systems to talk over HTTP using a set of simple rules. Each thing you work with, like a user or an order, is treated as a resource with its own URL, and you act on it using standard HTTP methods such as GET, POST, PUT, and DELETE. REST is popular because it is stateless, predictable, and works naturally with the web.
- A REST API exposes resources over HTTP using standard methods and URLs.
- It is stateless, so each request carries everything the server needs.
- Responses are usually JSON, and status codes signal the outcome.
The core ideas
- Resources: everything is a resource identified by a URL, like /users/42.
- HTTP methods: GET reads, POST creates, PUT or PATCH updates, DELETE removes.
- Stateless: each request carries everything the server needs, no session memory between calls.
- Representations: data is usually sent back as JSON.
So a client that wants a user sends GET /users/42 and gets back JSON describing that user. The same URL with DELETE would remove it. The method decides the action and the URL decides the target.
A strong one liner is REST is an architectural style that uses URLs for resources and HTTP methods for actions, and it is stateless. Mentioning statelessness early shows you understand the key constraint.
Frequently asked questions
What makes an API RESTful?
Using resources with clear URLs, standard HTTP methods, statelessness, and standard status codes. A uniform, predictable interface is the core idea.
What is a resource in REST?
A resource is any thing the API exposes, such as a user or an order, identified by a URL like /users/42 and acted on with HTTP methods.
Common follow up questions
Related interview questions
Want the full API Design guide?
Read every API Design concept with notes, diagrams, and code in one place. Track your progress as you go.
Open the API Design guide All API Design questions