0% found this document useful (0 votes)
2 views

REST Document

Uploaded by

siva kick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

REST Document

Uploaded by

siva kick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

REST API

What is REST?
The REST stands for

REpresentational
State
Transfer
State means data
>Representational means formats (such as xml, Json, yami, html,etc)
Transfer means camy data betweeen consumer and provider using
HTTP protocol

REST Architecture
Service Provider (Server)
Consumer(Client) HTTP Request

Android iPhone

Message ExChange REST APIS


Desktop Format (SON
Windows OF
A
Web Server
App Database

Web App

HTP Response

REST Architectural Constraints


RESTful API
Client-senver architecture:
The client is the front-end and the server is the back-end of the service.

It is important to note that both of these entities are independent of each other.
Stateless:

No data should be stored on the server during the processing of the request
transfer. The state of the session should be saved at the client's end.

Cacheable:

The client should have the ability to store responses in a cache.

This greatly improves the performance of the API.

Uniform Interface:
This constraint indicates a generic interface to manage all the interactions
between the client and server in a unified way, which simplifies and decouples
the architecture.

Layered System:
The server can have multiple layers for implementation.

This layered architecture helps to improve scalability by enabling load balancing.

URl::

Uniform Resource ldentifier (URI).


For web-based systems, HTTP is the most commonly used protocol for
communicating with external systems.

You can identify a unique resource using a URI.

HTTP Methods
GET.To geta collection or a single record
POST:: To create a new record

PUT:: To update an exieting record


DELETE:: To delete a collection or a single record

Difference between POST and PUT methods?


POST: post will always create new record In database

Which is not-idompotent

PUT: f already ld Is avallable update the record, If record not avallable save the new record.
t is idompotent.

What is ldompotent?

When you hit the samerequest multiple time it will give always same result
Put & delete both are idompotent.

You might also like