REST-API

What is the REST-API

Pramud Nadula
3 min readMay 14, 2022

REST is an architectural style for distributed hypermedia systems that stands for Representational State Transfer. It was first presented in Roy Fielding’s famous dissertation in 2000.

It is a client/server networked hypermedia application architectural style. RESTful web services are online services that use the REST architecture. These services are designed to perform best on the web and include features such as a consistent user experience.

Resources are data and functionality that are accessed using URIs. To represent a resource, REST uses multiple representations such as text, JSON, and XML. It’s also made to work with stateless communication protocols like HTTP. PUT, DELETE, POST, and OPTIONS are a few of the most regularly utilized techniques. Not only is it stateless, but it also has other crucial benefits such as being simpler than SOAP, being able to see faults or mistakes while working, and being lightweight, maintainable, and scalable.

REST API: Best Practices, Concepts, Structure, and Benefits | AltexSoft

Guiding Principles of REST

REST has its own set of guidelines and limits. If a service interface is to be called RESTful, these principles must be followed. RESTful architecture has six guiding concepts.

These principles are:

  1. Uniform Interface
  2. Client-Server
  3. Stateless
  4. Cacheable
  5. Layered System
  6. Code on Demand

The Architecture of the REST-API

Architecture of the REST-API
  • HTTP GET, POST, PUT, or DELETE requests are transmitted from the client to the server in the form of a web URL.
  • After that, the server sends back a response in the form of a resource, which can be HTML, XML, Image, or JSON.
  • In a REST-based architecture, there are five methods in HTTP that are often utilized. These are the commands for creating, reading, updating, and deleting.
  1. POST –To create new subordinate resources
  2. GET –To retrieve resource representation
  3. PUT-To update an existing resource
  4. PATCH-To make a partial update
  5. DELETE- To delete the resources

Advantages of REST-API

  • client and server are independent
  • By serializing data in XML or JSON format, it adds flexibility to formats.
  • Scalable
  • transparency and dependability
  • Because of its simplicity, the REST API is simple to grasp and learn.

Difference between REST and SOAP

Difference between REST and SOAP
Difference between REST and SOAP

I hope you found this useful. I would like to hear from you so feel free to drop a comment or connect with me via LinkedIn or Portfolio.

--

--