RESTful Web APIs

Web server complexity can be roughly divided into three levels:

Static
A static server does not computation of content. It parses the request, finds the file or other pre-computed information that has the answer, and responds with the contents of that file.
Stateless

A stateless server does compute part of the content, but does so based only on the current request; requests are not combined into sessions and do not otherwise interact with one another. Stateless usually also contain some static information. Static servers are a trivial subset of stateless servers.

The stateless term is somewhat misleading: the server does maintain state and requests can modify that state, but the state is not divided into different state for different clients.

Stateful
A stateful server can track of different information for different clients. Often, this looks like a log-in action followed by a series of actions that interact with the logged-in user’s data, then a log-out action. Stateful servers usually also contain some stateless and static information. Stateless servers are a trivial subset of stateful servers.

A particularly popular form of stateless server designs are web APIs that use the REST architectural style, also called REST APIs or RESTful Web APIs.

1 REST

REST officially an abbreviation for representational state transfer, though that longer term is rarely used. REST includes 5 properties:

2 RESTful Web API

In general, RESTful web APIs have the following properties: