Product → API Products
REST
An architectural style for resource-oriented network APIs using uniform operations and stateless communication.
Where it fits
REST is an architectural style for designing resource-oriented APIs. It builds on HTTP concepts such as methods, status codes, URLs, representations, and caching.
Mental model
REST models the system as resources. Clients interact with resource representations using a small set of standard operations rather than custom remote procedure names.
Example
GET /products/42 reads a product. PUT /products/42 replaces it. DELETE /products/42 removes it.
Common mistakes
- Calling every JSON-over-HTTP API REST.
- Ignoring idempotency.
- Putting verbs everywhere in URLs instead of modeling resources.
- Treating REST and GraphQL as identical API styles.
Related concepts
HTTP, HTTP methods, CRUD, idempotency, API, GraphQL.