08/05/2017

Different types of Application Program Interfaces (APIs)

There are many businesses today that are migrating from static web presence to more dynamic systems. Even consumers are expecting the data to be readily available at their convenience through devices like smartphones, tabs, game consoles etc. This has increased the importance of APIs (Application Programming Interface) in building dynamic applications for enterprise computing and web services. There are many APIs available today that allow easy integration of applications to legacy systems and enable programs to use each other’s functionality. With various APIs available that are able to offer different features and functionalities, it is important to choose a right one that addresses the business and technical needs of an application or program.

API models – Public & Private APIs

APIs are broadly divided into internal and external based on how they are adopted and shared in a system. Internal APIs are exclusively meant for building internal applications to use within the company or organization or customize it for partners to facilitate service oriented architectures. Using private or internal APIs, organizations can streamline business process and integrate their internal applications across their customers and partners. Contrary to that, public APIs are for open sharing and accessing of information and services. This is like an open resource where the users can create their own unique functionality by extending the original source. Partner API model is another type where businesses work together in a strategic partnership to share data or a service. In this case, businesses that offer API service allow third party partners to embed the service or data into their applications. 

API Types 

Based on how systems or software interact with one another in building the application architecture, there are several APIs available for web service, hardware, operating systems, data structures, programmatic interfaces etc. Some of the standard API class libraries and frameworks are specifically helpful in performing specific actions and exchange of information. For instance, by including or integrating a Javascript Google Maps API in the code, developers can add the feature of interactive Google Maps to an application or a web page. Another example is a YouTube Data API. Using this API, developers can include YouTube functionality to the site to retrieve and manipulate resources like videos, playlists, and channels.

What are Web APIs?

Among several API types, web APIs are widely used to integrate software or a service in a website or app through World Wide Web. That means through HTTP protocol the exchange of data or information occurs between desktop, mobile and web applications. Depending on the data transfer formats used in request-response messaging, web APIs are classified as SOAP (Simple Object Access Protocol), RPC (Remote Procedure Call), and REST (Representational State Transfer). These are the different protocols through which exchange of information takes place over web. The most common data formats used to define the response / request messages are XML, JSON, HTML or binary files for documents, videos and images. 

The web APIs are further divided into client and server side based on how they extend their functionality in web browser. Client side APIs are broadly used for manipulating different aspects of browser whereas server side APIs are meant for executing functionality on a server before the data is sent to browser. When a request is made to an API, the result will be in the form of response invoking an action. But there are some special server side APIs called webhooks that act as user-defined HTTP callbacks to invoke a behaviour or event. By configuring an event in one website, an action can be automatically invoked in the other. That means whenever the condition is met in the source site, webhooks acknowledge the event, and triggers the action on the url specified in the form of HTTP request. Today, webhooks are widely used for passing the information or triggering specific events between applications and servers.