What is API – And it’s Types

An API stands for Application Programming Interface. As per it’s definition, it serves as an interface between one software product and another. Essentially, it is a set of programming code that enables data transmission between two or more software products or applications. It also contains the terms for this data exchange.

https://lh6.googleusercontent.com/_nYCLkTG8PO_Wx5-jkdIq3Wyo1PBGrh4wiincNkb5cnZijpxfzCclyxMJbNwYItS8T3Iao-Cqm5WphPy4d4Mlihszki6MBiqZA7NBwTnuFxU49ppZEZyv8v0QEEVAA9Ai3buwhG7

A really easy real life example would be – imagine you have received an event invited email on your Gmail. Now you have an option to add this event to your Google calendar directly from the email. All you have to do it click a single button!

But now imagine, if you had to create this event manually, you would need to enter details. Details like, time, date, location and reminder options, etc. This is now happening with just a button click. When you click this button, your browser internally invokes an API call to Google’s server. This call carries metadata such as your authentication details. It also contains all the necessary data needed to create a calendar event entry, which has been picked from the email.

It receives the response from the Google server once event is created, and you get to see a “Event Created” message. While you are looking at the same window, these calls and executions have happened behind your screen.

Types of API (Based on Use Cases)

  1. Operating systems APIs 
    These define how applications use the resources and services of operating systems. Every OS has its set of APIs, for instance, Windows API or Linux API.
  2. Database APIs
    These enable communication between an application and a database management system. Developers work with databases by writing queries to access data, alter tables, etc. 
  3. Remote APIs
    Remote APIs define standards of interaction for applications running on different machines. Here, a software product or application accesses resources located outside the device that requests them. Since two remotely located applications are connected over a communications network, particularly the internet, most remote APIs are written based on web standards. Java Database Connectivity API and Java Remote Method Invocation API are two examples of remote application programming interfaces.
  4. Web APIs
    This type of API class is the most common. Web APIs provide machine-readable information transfer between web-based systems which represent client-server architecture. These APIs mainly deliver requests from web applications and responses from servers using Hypertext Transfer Protocol (HTTP).

API Documentation – At Your Service

No developer will be able to make use of any great API, unless he or she knows how to work with it. What type of requests can be made, and what inputs are needed, and so on. Hence, usually all APIs have a detailed and well structured documentation that explains how to use and integrate it.

The API documentation is a reference manual with all needed information about the API, including functions, classes, return types, and arguments.

For further reading, do read what does an API Gateway do. Also, the types of API can be defined based on release policies (private, partner and public). You can definitely give that topic a read. I might cover it some other day, in a separate article. And I will definitely link it over here, once it is ready!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.