A REST API (Representational State Transfer API) is a set of rules and conventions for building and interacting with web services. It uses standard HTTP methods like GET, POST, PUT, and DELETE to perform operations on resources, typically represented in formats like JSON or XML.

🌐 Core Concepts
| Concept | Description |
|---|---|
| HTTP Methods | REST uses standard verbs like: – GET (retrieve data)– POST (create data)– PUT (update data)– DELETE (remove data) |
| Stateless | Each request is independent — the server doesn’t store client context between requests. |
| Resources | Everything (like users, products, or orders) is treated as a resource, typically represented by a URL (e.g. /api/products/42) |
| JSON or XML | Most REST APIs use JSON to send and receive data because it’s lightweight and easy to read. |
| HTTP Status Codes | Standard codes to indicate success or failure (e.g., 200 OK, 404 Not Found, 500 Internal Server Error) |
💡 Example
GET https://api.example.com/users/123
→ Retrieves info about user with ID 123
{
"id": 123,
"name": "Steven Baert",
"email": "steven@example.com"
}
« Back to Glossary Index