Difference between revisions of "REST API"

From NP Tracker projects
Jump to navigation Jump to search
(Created page with "A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. A RESTful API -- also referred to as a RESTful web service...")
 
 
Line 1: Line 1:
A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data.
+
A '''RESTful API''' is an application program interface (API) that utilizes HTTP requests to perform operations such as retrieving (GET), updating (PUT), creating (POST), and deleting (DELETE) data.
  
A RESTful API -- also referred to as a RESTful web service -- is based on representational state transfer (REST) technology, an architectural style and approach to communications often used in web services development.
+
A RESTful API, also known as a RESTful web service, is based on the principles of representational state transfer (REST) technology. REST is an architectural style and communication approach commonly employed in web services development.
== How RESTfull API's work ==
+
 
A RESTful API explicitly takes advantage of HTTP methodologies defined by the RFC 2616 protocol. They use GET to retrieve a resource; PUT to change the state of or update a resource, which can be an object, file or block; POST to create that resource ; and DELETE to remove it.<br>
+
== How RESTful APIs Work ==
<br>
+
RESTful APIs leverage the HTTP methodologies outlined in the RFC 2616 protocol. They employ the following HTTP methods: GET to retrieve a resource, PUT to modify or update a resource (which could be an object, file, or block), POST to create a resource and DELETE to remove a resource.
With REST, networked components are a resource you request access to -- a black box whose implementation details are unclear. The presumption is that all calls are stateless; nothing can be retained by the RESTful service between executions.<br>
+
 
<br>
+
In the REST architecture, networked components are treated as resources that you request access to. These components are like black boxes, with their internal implementation details hidden. The fundamental assumption is that all API calls are stateless, meaning that no information is retained by the RESTful service between executions.
Because the calls are stateless, REST is useful in cloud applications. Stateless components can be freely redeployed if something fails, and they can scale to accommodate load changes. This is because any request can be directed to any instance of a component; there can be nothing saved that has to be remembered by the next transaction. That makes REST preferred for web use, but the RESTful model is also helpful in cloud services because binding to a service through an API is a matter of controlling how the URL is decoded. Cloud computing and microservices are almost certain to make RESTful API design the rule in the future.
+
 
 +
This stateless nature of REST makes it well-suited for cloud applications. Stateless components can be easily redeployed in case of failures, and they can scale dynamically to handle varying loads. Since any request can be directed to any instance of a component, there is no need to maintain any session-specific information between transactions. This makes REST a preferred choice for web applications. Moreover, the RESTful model is also valuable in cloud services, as it allows for flexible binding to service through API-controlled URL decoding.
 +
 
 +
Given the rise of cloud computing and microservices, it is highly likely that RESTful API design will become the standard approach in the future.

Latest revision as of 11:31, 17 June 2023

A RESTful API is an application program interface (API) that utilizes HTTP requests to perform operations such as retrieving (GET), updating (PUT), creating (POST), and deleting (DELETE) data.

A RESTful API, also known as a RESTful web service, is based on the principles of representational state transfer (REST) technology. REST is an architectural style and communication approach commonly employed in web services development.

How RESTful APIs Work

RESTful APIs leverage the HTTP methodologies outlined in the RFC 2616 protocol. They employ the following HTTP methods: GET to retrieve a resource, PUT to modify or update a resource (which could be an object, file, or block), POST to create a resource and DELETE to remove a resource.

In the REST architecture, networked components are treated as resources that you request access to. These components are like black boxes, with their internal implementation details hidden. The fundamental assumption is that all API calls are stateless, meaning that no information is retained by the RESTful service between executions.

This stateless nature of REST makes it well-suited for cloud applications. Stateless components can be easily redeployed in case of failures, and they can scale dynamically to handle varying loads. Since any request can be directed to any instance of a component, there is no need to maintain any session-specific information between transactions. This makes REST a preferred choice for web applications. Moreover, the RESTful model is also valuable in cloud services, as it allows for flexible binding to service through API-controlled URL decoding.

Given the rise of cloud computing and microservices, it is highly likely that RESTful API design will become the standard approach in the future.