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 −
API’s are useful in many scenarios. Some of these are given in detail as follows −
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.
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.
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.
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.
The policies for releasing API’s are private, partner and public. Details about these are given as follows −
The application programming interfaces released under this policy are for private internal use by the company.
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.
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.