Introduction :
Representational State Transfer (REST) is an architectural style for designing web-based applications. RESTful APIs (Application Programming Interfaces) use HTTP (Hypertext Transfer Protocol) to exchange data between client applications and servers. RESTful APIs rely on a set of constraints to operate, including a uniform interface, client-server architecture, statelessness, and a layered system, which ensures scalability, flexibility, and simplicity.
RESTful API Architecture:
Client-Server Architecture: In a RESTful API, the client and server are separated into distinct layers. This separation allows for better scalability and flexibility.
Statelessness: RESTful APIs are stateless, meaning that each request contains all the information necessary to complete the request. This allows for better scalability and performance.
Cacheability: RESTful APIs are designed to be cacheable, which can improve performance by reducing the number of requests that need to be made to the server.
Layered System: RESTful APIs are designed to be layered, with each layer providing a different level of abstraction. This allows for better scalability and flexibility.
Uniform Interface: RESTful APIs use a uniform interface, which consists of a set of HTTP methods (GET, POST, PUT, DELETE, etc.) and resource representations (JSON, XML, etc.). This promotes simplicity and ease of use.
HTTP Methods:
The HTTP methods used in RESTful APIs are used to perform operations on resources. The most commonly used methods are:
GET: Retrieves a resource from the server.
POST: Creates a new resource on the server.
PUT: Updates an existing resource on the server.
DELETE: Deletes a resource from the server.
Resource Representation:
The resource representation is the format used to represent the resource being accessed or manipulated. The most commonly used formats are JSON and XML.
Endpoints and URIs:
RESTful APIs are accessed through endpoints, which are represented by URIs (Uniform Resource Identifiers). A URI is a string of characters that identifies a resource on the web.
https://personal-wybzdceu.outsystemscloud.com/API_CS/rest/RESTAPI/
Security:
Security is an important consideration when designing RESTful APIs. There are a number of security measures that can be taken to protect against attacks, including:
Authentication: requiring clients to provide credentials to access the API.
Authorization: controlling what actions a client can perform on a resource.
SSL/TLS: encrypting the communication between the client and server.
Rate Limiting: limiting the number of requests that can be made