What is REST API?

 Introduction to REST API!!!!👇👇👇

 REST stands for representational state transfer and was created by Roy Fielding, a computer scientist.

 A REST API is an application programming interface that adheres to the REST architectural style’s requirements and allows users to communicate with RESTful web services.

REST is a hybrid architectural style that combines multiple network-based architectural styles with extra limitations that establish a standardized connector interface.

When we talk about an API, we’re talking about a set of definitions and protocols for creating and integrating software applications.

Deriving REST 👇

The following is a description of it. An architectural pattern, which includes a set of constraints applied to pieces within the architecture, can explain the design rationale for web architecture. It is possible to notice the properties generated by the web’s constraints by examining the impact of each constraint as it is added to the spinning style. Then, to establish a new architectural style that better reflects the necessary qualities of current web architecture, more limitations might be applied.

The 6 very important constraints of REST

Six limitations are described in the REST architectural style.

The 6 constraints are as follows.

1. Uniform interface.

2. Stateless.

3. Cacheable.

4. Client-server

5. Layered system.

6. Code on demand.

Uniform Interface 👍

The overall system architecture is reduced and the visibility of interactions is sharpened by applying the software engineering principle of generality to the component interface.

To achieve a unified interface, multiple architectural constraints are required to guide component behavior.

REST is described by four interface constraints.

They are;

· Resources must be identified.

· Using representations to manipulate resources.

· Messages that describe themselves.

· Hypermedia as the application state engine

Stateless 👍

Each request from the client to the server must include all necessary information to comprehend the request and should not rely on any server-stored context. As a result, the client retains total control over the session state.

Cacheable 👍

Due to budget limits, data in a response to a request must be explicitly identified as cacheable or noncacheable. If a response is cacheable, the client cache has the right to reuse the response data for similar requests in the future.

Client-Server 👍

We develop the user interface’s mobility across many platforms and scalability by simplifying the server components and separating the user interface and data storage concerns.

Layered system 👍

By restricting component behavior such that each component cannot oversee the immediate layer with which they are interacting, the layered system pattern allows an architecture to be made of hierarchical levels.

Code on demand (optional) 👍

REST allows you to expand client functionality by downloading and running code in the form of applets or scripts. Clients benefit since the number of functionalities that must be pre-implemented is reduced.

This is all about Rest API Introduction.

Thanks for Being here.
 visit www.javaoneworld.com for more.

No comments:

Post a Comment