Application Programming Interface (API)

An Application Programming Interface (API) contains software building tools, subroutine definitions as well as communication protocols that facilitate interaction between systems. An API may be for a database system, operating system, computer hardware or a web-based system.

An Application Programming Interface makes it simpler to use certain technologies to build applications for the programmers. API can include specifications for data structures, variables, routines, object classes, remote calls etc.

A diagram that shows the API in the system is as follows −


Uses of Application Programming Interfaces

API’s are useful in many scenarios. Some of these are given in detail as follows −

Operating Systems

The interface between an operating system and an application is specified with an API. For example- Posix has API’s that can convert an application written for one POSIX Operating System to one that can be used on another POSIX operating system.

Libraries and Frameworks

Often API’s are related to software libraries. The API describes the behaviour of the system while the libraries actually implement that behaviour. A single API can have multiple libraries as it can have many different implementations. Sometimes, an API can be linked to a software framework as well. A framework is based on many libraries that implement different API’s whose behaviour is built into the framework.

Web APIs

The application programming interfaces for web servers or web browsers are known as web API’s. These web API’s can be server side or client side.

Server side web APIs have an interface that contains endpoints which lead to request-response message systems that are written in JSON or XML. Most of this is achieved using a HTTP web server. Client side web API’s are used to extend the functionality of a web browser. Earlier they were in the form of plug-in browser extensions but now JavaScript bindings are used.

Remote APIs

The remote application programming interfaces allow the programmers to manipulate remote resources. Most remote API’s are required to maintain object abstraction in object oriented programming. This can be done by executing a method call locally which then invokes the corresponding method call on a remote object and gets the result locally as a return value.

Release policies for API

The policies for releasing API’s are private, partner and public. Details about these are given as follows −

Private release policies

The application programming interfaces released under this policy are for private internal use by the company.

Partner release policies

The application programming interfaces released under this policy can be used by the company and its specific business partners. This means that the companies can control the quality of the API, by monitoring the apps which have access to it.

Public release policies

The application programming interfaces released under public release policies are freely available to the public. Some examples of this are Microsoft Windows API, Apple’s Cocoa and Carbon API’s etc.