What Is a REST API?
Imagine planning a summer vacation; however, you do not know where you want to go. Logically, you would like to go to a travel agent to find the best destination at the best price. This agent would give you information, brochures, and whatever else they have to offer to help you make the best decision. Once you decide where you want to go, the agent will book your tickets, hotels, rental cars, etc.
This travel agent had a similar role as an API in your vacation planning. While the agent connects you with the hotels, airlines, and rental agencies, an API connects you with data in some of your most common computer programs.
Critical Differentiators for REST APIs
A computer scientist named Roy Fielding developed six architectural constraints or standards which guide the creation of processes that enable us to retrieve data from the web. These six constraints make up what is called “REST,” or Representational State Transfer. Any API that adheres to the constraints of REST is considered to be RESTful. In other words, they are REST APIs.
With REST APIs, we can connect with other servers using the HTTP protocol. This means users can Create, Read, Update, and Delete data. These four operations are known as CRUD operations, and they are the most commonly used methods in a REST API. What allows us to do these CRUD operations is that REST simplifies the communication process by giving different HTTP Methods, Operations, or Verbs, which are used to send requests to the servers.