What is REST?

Representational State Transfer (REST) can be defined as an architectural style used to create and design web resources that communicate via an HTTP protocol. Over time, REST has become the industry standard in software development for creating reliable REST APIs. The REST architecture is designed to work with six guiding constraints, which are as follows:

  • Simplicity
  • Scalability
  • Reliability
  • Portability
  • Modifiability
  • Visibility

Note: A web resource or API that follows the above REST constraints is described as RESTful.

What is an API?

An Application Programming Interface (API) is how different systems or computers communicate. In today’s world, an API is a piece of software that can apply to almost every aspect of technology, such as web applications, command-line tools, third-party integrations, and more.

What is a REST API?

A REST API uses HTTP requests to GET, PUT, POST, UPDATE, PATCH, and DELETE data by considering the rules guiding REST constraints. REST APIs make it possible for different software to interact with each other remotely by using HTTP methods.

Features of a REST API

Some of the features of a REST API include the following:

  • It supports both JSON and XML formats.

  • It supports stateless interactions. Each request made is treated differently from the previous, making it necessary to validate each request.

  • HTTP methods are used to make requests.

  • It returns error messages that are easily understood.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy