What is Rest API?

What is Rest API?

REST (Representational State Transfer) is a software architecture that defines a set of rules for web services to standardize software design across all web applications so that communication and data transfer is made easier. In a RESTful Web service, requests made to a resource’s “URI” will get a response with a payload/response formatted in HTML, XML , JSON etc. These requests can be of several types like “POST”, “GET”, “DELETE”, “PUT” etc.

A RESTful API is an architectural style for an application program interface (API) that uses HTTP requests to access and use data. That data can be used to GET, PUT, POST and DELETE data types, which refers to the reading, updating, creating and deleting of operations concerning resources.

The style is made by 5 main constraints:

  1. It’s client-server.
  2. It’s stateless.
  3. It’s cacheable.
  4. Presents a uniform interface.
  5. It’s structured in layers.

In the layman’s terms RESTful is basically a one of the architectural style which allows you to communicate between two services over the internet.
It uses HTTP protocol to access and create data. That data can be used to GET, PUT, POST and DELETE data types, which refers to the reading, updating, creating and deleting of operations concerning resources.