0% found this document useful (0 votes)
20 views10 pages

Restful API

REST (REpresentational State Transfer) APIs enable communication between software applications using HTTP requests, typically in JSON format. They are characterized by stateless interactions and a uniform interface, offering advantages like scalability, flexibility, and platform independence, but also face challenges such as data overfetching, security concerns, and versioning complexities. REST APIs are commonly used for web-based applications and support various methods for data manipulation, corresponding to CRUD operations.
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)
20 views10 pages

Restful API

REST (REpresentational State Transfer) APIs enable communication between software applications using HTTP requests, typically in JSON format. They are characterized by stateless interactions and a uniform interface, offering advantages like scalability, flexibility, and platform independence, but also face challenges such as data overfetching, security concerns, and versioning complexities. REST APIs are commonly used for web-based applications and support various methods for data manipulation, corresponding to CRUD operations.
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/ 10

• REST stands for REpresentational State Transfer.

• API is a mechanism that allows different software applications to


communicate with each other over the internet or local network.
• REST APIs follow specific rules and standards that enable applications and
users to use HTTP requests to access and use data.
• The data sent and received by a REST API is generally in the JSON
(JavaScript Object Notation) format.
• Data sent is a request, and the data received from the API call is called
the response. Two main characteristics of RESTful APIs include:
– Stateless Interactions: Each request from a client to a server must contain all
the information needed to understand and process the request. The server
does not store any session information about the client.
– Uniform Interface: A REST API is designed to use standard HTTP methods and
should be easy for any developer familiar with HTTP.
Why REST API
 Scalability: Due to their stateless nature, REST APIs can handle
multiple types of calls, return different data formats, and even
change structurally with the correct implementation of
hypermedia.
 Flexibility and Portability: Data is not tied to resources or
methods, allowing more flexibility in its representation. This
makes REST APIs suitable for different types of applications.
 Independence: The separation between client and server
allows for development across various parts of an application
to coincide with less dependency on each other.
 light weight, highly scalable and maintainable and are very
commonly used to create APIs for web-based applications.
Principles RESTful Architecture
Six guiding principles RESTful architecture are:
RESTful API Caching
REST API Methods
 GET: This API method requests data from a specified resource. It should
only retrieve data and should have no other effect.
 POST: This API method sends data to the server for creation. It is often
used when uploading a file or submitting a completed web form.
 PUT: This API method updates all current representations of the target
resource with the uploaded content.
 DELETE: As the name suggests, this method removes/deletes a specified
resource.
 HEAD: Similar to GET, this method only transfers the status line and the
header section.
 PATCH: This method applies partial modifications to a resource.

Each method corresponds to the CRUD (Create, Read, Update, Delete)


operations in database management.
Advantages of REST API
 Simplicity and Flexibility
 Platform Independence
 RESt APIs are also performant and efficient since responses
can be effectively cached to minimize data transfers.
Challenges REST APIs
 The statelessness of REST can lead to larger requests since all
necessary data must be included in each request. This also
creates issues like:
 Data Overfetching and Underfetching, which can impact performance, as
multiple requests may be needed to gather all data, or excessive data may be
returned unnecessarily.
 Security concerns are a potential challenge, requiring proper
implementation of authentication and data transfer security
practices to keep data secure.
 versioning of REST APIs can be complex, with changes
potentially breaking backward compatibility.
 The lack of a strict standard in REST implementation can lead
to inconsistencies across different APIs
API Analytics and Monetization
 Live API traffic
 Time-series reports inspecting usage
 Conversion funnels
 Retention reports

You might also like