An application programming interface or API is a set of data structures, protocols, routines and tools for accessing a web-based software application. It provides all the building blocks for developing programs with ease. An application programming interface may be language dependent or language independent. A language dependent API is available only in a particular programming language. Language independent APIs are not bound to a particular language, system or process. They can be called from several programming languages.
APIs run silently in the background. They are completely invisible to software users and web surfers. They're primary role is to provide a channel for applications to work with each other to make sure the user gets the required functionality and information.
For example, when a user buys a product online and enters his or her credit card information, the product website uses an API to send the credit card information to another application. The application verifies whether the information is correct or not. It then authorizes the product website to issue the purchased product after the information is verified and payment is confirmed. A website has many such applications that work together using APIs.
Application programming interfaces ensure that software developers do not have to start building applications from scratch. There is no need to build one application that performs every function. The application can transfer certain responsibilities to a remote application. Thus, APIs are similar to SaaS (Software as a Service).
A software company releases its API to programmers in the form of a software development kit (SDK). The SDK includes programming tools, the application programming interface and release documents to make the programmer’s job easier.
A company follows some publishing policies before releasing APIs to the developers, including:
- Key information about an application programming interface cannot be released to anybody out of the company.
- Companies have to make APIs freely available to the public. For example, Microsoft® makes DirectX® and its entire APIs free to developers. They have to download the SDK to access these components. Microsoft® has also made the Windows® API free to developers for creating applications consistent with the operating environment. Apple® has also released its APIs Carbon® and Cocoa® for developers to create useful applications for the iPhone.
- A company protects information from the general public. For example, the official PlayStation® 2 API was released by Sony® only to licensed PlayStation® developers. Thus, Sony® enjoyed total control on the quality of its games and enjoyed any potential license revenues.