π€ REST API Design Best Practices
#api #restApi
β Article link: https://medium.com/@techworldwithmilan/rest-api-design-best-practices-2eb5e749d428
#api #restApi
There are different types of API protocols:
REST β relies on a client/server approach that separates the front and back ends of the API and provides considerable flexibility in development and implementation.
RPC β The remote procedural call (RPC) protocol sends multiple parameters and receives results.
SOAP β Supports a wide range of communication protocols found across the internet, such as HTTP, SMTP, and TCP.
WebSocket β Provides a way to exchange data between browser and server via a persistent connection.
β Article link: https://medium.com/@techworldwithmilan/rest-api-design-best-practices-2eb5e749d428
β€2
π€ Cheat Sheet for REST API Design
#info #restApi #guide
β Article link
#info #restApi #guide
REST Principles
Resource-based: REST APIs are designed around resources, which are identified by unique URIs (Uniform Resource Identifiers).
Stateless: Each request from the client to the server must contain all the necessary information for the server to understand and process the request. The server should not rely on storing any client context between requests.
Cacheable: Responses from the server should be labeled as cacheable or non-cacheable, allowing clients to cache responses and improve performance.
Uniform Interface: REST APIs should follow a consistent interface, using standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources.
Layered System: REST APIs can be composed of multiple layers, allowing for load balancing, caching, and proxy servers.
β Article link
π3