Skip to content
We areTOP 1%

What is a REST API, and what makes an API RESTful?

EasyConceptAPIs & Communication
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

REST (Representational State Transfer) is an architectural style in which clients manipulate resources, identified by URLs, through standard HTTP methods. A RESTful API is stateless, uses a uniform interface, and exchanges representations such as JSON.

  • Methods: GET reads, POST creates, PUT replaces, PATCH partially updates and DELETE removes. GET, PUT and DELETE are idempotent; POST is not.
  • Resource naming: use nouns and hierarchy, such as GET /users/42/orders, not verbs like /getOrders.
  • Status codes: 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, 429 Too Many Requests, 500 Internal Server Error.
  • Statelessness: each request carries everything needed, including authentication, which simplifies horizontal scaling and caching.

More in APIs & Communication

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account