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

RestAPI Architecture

REST (Representational State Transfer) is an architectural style for designing networked applications that uses JSON/XML for data exchange. It is stateless, meaning client data is not stored on the server, and it operates over HTTP/HTTPS protocols, making it language-independent. Key components include endpoints with URIs, resources, parameters, and four main HTTP methods: GET, POST, PUT, and DELETE for interacting with the server.

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

RestAPI Architecture

REST (Representational State Transfer) is an architectural style for designing networked applications that uses JSON/XML for data exchange. It is stateless, meaning client data is not stored on the server, and it operates over HTTP/HTTPS protocols, making it language-independent. Key components include endpoints with URIs, resources, parameters, and four main HTTP methods: GET, POST, PUT, and DELETE for interacting with the server.

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

REST -> REpresentation State Transfer

Representation -> How resources are manipulated


REST API uses JSON/XML for data. -> Payload
We create request in the form of JSON/XML and we also get response from the
RESTAPI in the form of JSON/XML only

It is stateless -> Client data is not stored on the server, session data is also stored
on the client

It uses http/https protocol and it makes it language independent


RESTAPI can be written in any language and developers in any language can
consume it
Endpoints:

Endpoints contain:
1. URIs -> This is the essentially the endpoint (Address of the resource where to
contact) Unique Resource Identifier
2. Resources -> Which specific thing we want - navigate to a page and then
show
3. Parameters - Used to filter the resources. When we want to get specific data
from the resource
1. There are 4 important HTTP Keywords (GET, PUT, POST, DELETE)
2. These keywords are knows are types of request
3. Response -> HTTP (Status, body, Headers)
4. Payload -> Data that we send to Rest with the request

GET -> It is used to retrieve the information from the server/app


Parameters can be provided as part of the URI

POST -> It is used to create new information on the server/app


Request should be provided as JSON/XML request as Payload

PUT -> It is used to update/modify the existing information on the server/app


Request should be provided as JSON/XML request as Payload

Delete -> It is used to delete the information from the server/app


Request should be provided as JSON/XML request as Payload
Headers:
Header contains information about the request and response.

Sometimes you may have to authenticate to the website and show that you are
authorized to access the resource
Some resources on the application may be secured and may not be accessible
directly
That information is contained in headers

Also content-type -> This information also exist in headers

You might also like