Skip to content

REST API

Architectural style of API: resources are addressed by URL, and actions are defined by HTTP methods.

Principles

  • Resources: /products, /products/1630;
  • Methods: GET to read, POST to create, PUT to update, DELETE to delete;
  • Stateless — each request is self-contained;
  • Responses in JSON.

Example

GET    /products       — list of products
POST   /products       — create
PUT    /products/1630  — update

See also

← All terms