RESTful API basics

It is a way to structure your API over HTTP.
REST stands for “Representational State Transfer”.
It has 5 major parts:

  • The endpoint
  • The method
  • The headers
  • Request body
  • HTTP status

Endpoint paths

Could be something like


GET Read entry/list of entries
POST Create an entry
PUT Update all entry fields
PATCH Update few entry fields
DELETE Delete an entry


Are used for content types, auth.

Request body

Is used for creating/updating entries

HTTP statuses

200 — ok
401/403 — not auth
404 — not found
5xx — server issue
More on them on the link below.
HTTP statuses —

Similar Posts