A REST API is a type of API that confirms to the RESTful constraints. REST is designed to take advantage of existing protocols like HTTP.
HTTP is a standard, REST is not. It’s an architectural style that has constraints that guide API design. For an API to be RESTful there are six rules that it needs to follow. The rules are as follows:
- Uniform interface
- Client–server
- Stateless
- Cacheable
- Layered system
- Code on demand (mostly legacy)
REST Standards
With REST there’s no standard, but there are some standards associated with REST such as oAuth and OpenAPI.
oAuth stands for Open Authentication. It’s an open standard for allowing applications to obtain limited access to a user’s information on another website without giving them the password.
OpenAPI is a standard to describe and document REST APIs. It allows us to define the API in a single document and validate the contracts we are creating as we go.
oData is another option for describing and documenting REST APIs. oData is pretty time consuming to set up, but it’s a great option.
OpenAPI, Open Data Protocol (oData), RAML and RSDL are sometimes also called RESTful API Description Languages.
Wrapping It Up
REST is not a standard, it’s a type of architecture. There are two competing standards that are related to REST: OpenAPI, and Open Data Protocol (oData).