What is REST API?

REST stands for Representational State Transfer

For an API to be RESTful, it must adhere to the following rules:

Stateless—A REST API is stateless in nature, Client-Server Architecture

Uniform Interface—A client and server should communicate with one another via HTTP using URIs, CRUD (Create, Read, Update, Delete) and JSON conventions.

Client-Server—The client and server should be independent of each other. The changes you make on the server shouldn’t affect the client and vice versa.

Cache—The client should have the ability to cache the responses as this improves the user experience by making them faster and more efficient.

Layered—The API should support a layered architecture, with each layer contributing to a clear hierarchy. Each layer should be loosely coupled and allow for encapsulation.

REST API Methods:

GET – Retrieve information about the REST API resource

POST – Create a REST API resource

PUT – Update a REST API resource

DELETE – Delete a REST API resource or related component

OPTIONS – List the supported operations in web service

HEAD – Returns only HTTP header and no body

SOAP vs REST API

 

 

Share

Bijan Patel

Founder & Creator of QAScript | 12+ years of IT Experience | Full Stack Automation Engineer | Blogger | Trainer

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!