Integration of data on Tekon IoT Platform by REST API - REST Api Fundamentals
REST, an acronym that stands for Representational State Transfer, is a style of software architecture. It is based on 5 mandatory and 1 optional principle, which describe how network resources are defined and addresses on the Internet.
API, an acronym that stands for Application Program Interface, is a set of rules that allows two different applications to communicate with each other over the Internet and through several devices.
REST API Fundamentals
Client-Server: client and server are decoupled throughout the architecture. The division between these parts promotes the portability of the user interface between diverse platforms.
Stateless: requests from the client to the server must contain all the information necessary to process the request. There is no session state on the server side, which is maintained on the client side. If access to a resource requires authentication, the customer must perform authentication on each request.
Cache: a stateless API can increase the overhead of an order, handling large amounts of incoming and outgoing requests, the data can be cached by the client, server or other intermediary. Response data must be categorized as cacheable or not. If a response is likely to be cached, the customer's cache will be granted the right to reuse that response data for equivalent requests that are made later.
Uniform interface: to separate the client from the server, it is necessary to have a uniform interface that allows the application to evolve without having the application services or models and actions associated with the API layer itself.
Layer system: individual components cannot see beyond the level with which they interact. This means that a customer who connects to an intermediate component, such as a proxy, does not know what is behind it. Therefore, the components can be exchanged independently of each other.
Code on demand (optional): allows code or applets to be transferred via API for use within an application.
The methods used by the REST API are identical to those provided by HTTP - POST, GET, PUT, DELETE, etc.