Instagram
youtube
Facebook
Twitter

What is REST and REST API ?

In this tutorial, we will explore the concepts of REST (Representational State Transfer) and RESTful APIs in Django REST Framework (DRF). 

What is REST?

REST is an architectural style for building web APIs. It is neither a framework nor a library; It is just a set of guidelines. It provides a set of principles and constraints that allow systems to be scalable, stateless, and easily interconnected.

 

What are REST APIs?

  • A web API created following the REST guidelines is known as a REST API or RESTful API.

  • REST APIs are built on top of the HTTP protocol and utilize its methods like - GET, POST, PUT, DELETE, etc. to perform operations on resources.

  • They enable clients to interact with server-side resources by sending requests and receiving responses in a stateless manner.

 

How do web REST APIs work?

  • First, the client makes an HTTP request to a web API.

  • Then, APIs communicate with Web applications or databases to collect data.

  • After this, a web application or Database provides the data to the API.

  • At last, the API returns response data to the client.