Exploring the types of APIs
Given our understanding of the basics of HTTP, let’s explore the most common types of API currently in widespread use. We will take a deeper look at the basics of the protocols, their typical use cases, and their strengths and weaknesses. Let’s dive in!
REST
REST is the acronym for REpresentational State Transfer and an architectural style for transferring hypermedia content over HTTP. REST does not specify a rigid standard, but rather a guideline to be followed, encapsulated by six principles:
- Uniform interface: The server should present a uniform interface to the client – namely, the interface should be identical across all client devices and platforms.
- Client-server: There are two clear roles in REST: a client requesting and receiving data, and a server responding and sending data. No other roles are defined.
- Stateless: REST is stateless, meaning that each individual request does not depend on preceding or subsequent...