Web and APIs
What Is a REST API?
Also called: RESTful API
A REST API is a web API that exposes resources at URLs and uses standard HTTP methods such as GET, POST, PUT and DELETE to work with them.
Definition
A REST API is a web API built on the REST (representational state transfer) style. Data is modelled as resources, such as users or orders, and each resource has its own URL.
Clients use standard HTTP methods on those URLs, and the server replies with a status code and, usually, JSON.
How it works
The methods map to actions: GET reads, POST creates, PUT or PATCH updates and DELETE removes. GET /users/42 fetches user 42; DELETE /users/42 removes it.
REST APIs are stateless: each request carries everything the server needs, such as an auth token, so any server in a cluster can answer it.