Types of APIs Based on Protocol

API stands for application programming interface

Types of APIs ?

Types of APIs can be categorized in three different parts:

  1. Based on Approaches/Availability
  2. Based on Services
  3. Based on Protocol

1. Types of APIs based on Protocol:

  1. Remote Procedure Call (RPC): It is the simplest format of API which used earliest. RPC API required the specific parameter and order, RPC is utilized to work with the web using HTTP or AMQP to resources exchange. The client request the resources and the server responds based on requested queries, the functionality of API is done on the server-side. It is also known as a subroutine call or a function call.
  2. Simple Object Access Protocol (SOAP): SOAP is based on XML type protocol which is used as the messaging protocol to deliver the structured information from server to client on request. Initially, SOAP is based on XML-RPC which uses the XML format to give the structure of the pieces of information.
  3. Representational State Transfer (REST): REST is used to provide the information exchange protocol which used in the web application, if the user wants to use REST APIs in their application then the application needs to meet the REST certain constraints, if it follows the constraints then such types of services called a RESTful, Constraints are given below :

    Constraints of RESTful API:

    • Uniform Interface
    • Stateless
    • Layered System
    • Client-Server
    • Code on Demand
    • Cacheable