API Flow

REST APIs

  • A REST API (Representational State Transfer Application Programming Interface) is a set of rules and conventions for building and interacting with web services. REST API supports JSON format. RESTful APIs are widely used due to their simplicity and scalability.

SOAP APIs

  • SOAP (Simple Object Access Protocol) is a protocol used for exchanging structured information in the form of XML (eXtensible Markup Language) messages over various network protocols, typically HTTP or SMTP.

API Protocols

  • API protocols, also known as communication protocols, define the rules and conventions that govern how different software components or systems communicate with each other.

Here we are using two protocols in our API flow -

  1. HTTP - The Hypertext Transfer Protocol (HTTP) is the foundation of data communication on the web. It's a request-response protocol where clients (such as browsers or applications) send HTTP requests to servers, which then respond with data.

  2. HTTPS - HTTPS is a secure version of HTTP that adds encryption and authentication using SSL(Secure Sockets layer)/TLS(Transport Layer Security).

Verbs for APIs

In the context of designing APIs, "verbs" often refer to the HTTP methods used to interact with resources. These methods determine the actions that can be performed on the resources.

Here are the common HTTP methods often associated with CRUD (Create, Read, Update, Delete) operations:

  • GET: Used to retrieve data from the server. It is a safe and idempotent method, meaning it should not have any side effects on the server or the data. Typically used for reading or fetching resources.

  • POST: Used to send data to the server to create a new resource. This method is not idempotent, as sending the same data multiple times could result in the creation of multiple resources with the same data.

  • PUT: Used to send data to the server to update an existing resource or create a new resource if it doesn't exist. PUT is idempotent, as sending the same data multiple times will result in the same state on the server.

  • PATCH: Used to send data to the server to partially update an existing resource. It's often used when you only want to modify specific fields of a resource, leaving the rest unchanged. PATCH is also idempotent.

  • DELETE: Used to request the server to delete a specific resource. After a successful "DELETE" request, the resource should no longer be accessible through the API.

For more detailed information, you can click here.

Last updated