What Is a REST API? Principles Explained Simply

REST is an architectural style for web APIs built around resources, standard HTTP methods, and stateless requests. Learn its core principles with examples.

Published September 20, 2026

REST (Representational State Transfer) is an architectural style for designing web APIs where every piece of data is modeled as a 'resource' accessed via a URL, and standard HTTP methods (GET, POST, PUT, DELETE) express the action to take on that resource.

Common causes

  • REST was proposed as a way to build web APIs that leverage HTTP's existing semantics (methods, status codes, caching) instead of inventing a custom protocol on top of it

How to fix it

  • Model each entity as a resource with its own URL: /users, /users/42, /users/42/orders
  • Use HTTP methods to express the action instead of encoding verbs in the URL — GET /users/42 not /getUser?id=42
  • Keep requests stateless — each request should carry everything the server needs (like an auth token) rather than relying on server-side session state between requests

Example

GET    /api/articles        → list articles
GET    /api/articles/42     → get one article
POST   /api/articles        → create an article
PUT    /api/articles/42     → replace an article
DELETE /api/articles/42     → delete an article

FAQ

Is REST the same as JSON?

No — REST is an architectural style independent of data format. JSON is just the most common format used in REST APIs today; REST APIs have historically also used XML.

More HTTP articles