What is REST API?

What is REST API?
REST API is considered as a solution in creating alternative web service applications for many other forms such as SOAP, WSDL...

What is REST API?

REST (Representational state transfer) is known as a software architecture style familiar to programmers, published in 2000 in the doctoral thesis of Ray Thomas Fielding - American computer scientist and co-founder set up the HTTP protocol.

In the simplest terms, REST is a form of data structure transformation, used in the design of connected applications.

It uses simple HTTP to help form the communication between machines.

In fact, REST is a method used to create APIs according to a certain organizational principle, so that programmers can build a more comprehensive API request processing environment.

And API is an application programming interface, a mechanism that allows two system components to communicate with each other through connection protocols.

Thus, REST API is an application that converts data structures with methods used to connect with other libraries...

REST API là gì?

Role of REST API

The most important role of REST is to prescribe how to use HTTP protocol (POST, GET, DELETE...) and URL format for a particular web application to perform resource management.

It doesn't limit and prescribe application programming languages, as well as code logic.

Therefore, any language or framework can be applied to design APIs.

REST API là gì?

How does REST API work?

REST usually works mainly based on HTTP protocols.

For each basic operation base that uses different HTTP protocols such as:

  • GET: Returns data as one or a list of resources.
  • POST: Create a new resource.
  • PUT: Support updating information for resources.
  • DELETE: Delete a resource on demand.

Any HTTP method can be used in API calls.

REST API là gì?