What is an API

If you are reading this, then you probably already know what APIs are. If not, here is a short explanation:

The definition

API stands for Application Programming Interface.

  1. Application stands for user application. It is normally a program that you use on your computer.
  2. Programming represents that APIs are used for programming (or building) an application.
  3. Interface means a method or a way for one object to talk to another object.

APIs, thus, are programmatic means and methods using which a program can do something. Normally, APIs provide certain services which can be used by an application and to use them normally, the application calls a method.

Types of APIs

APIs can be of multiple types:

  1. Local (System/Library) APIs: These are usually in form of a function/method call. The program(er) basically adds the library in one of the source files and calls a function.
  2. Remote (over-the-network) APIs: These are usually in form of calling an endpoint and waiting for the result. The programmer usually has to call a method which calls the remote resource using a protocol (socket, websocket, HTTP, custom) and gets the result once the remote computer has processed and returned the result.

Let’s get into a bit of depth:

Local APIs

Remote APIs

One of the most popular forms of APIs is REST. REST stands for REpresentational State Transfer and is implemented over HTTP protocol.

Updated:

Leave a comment