If you are reading this, then you probably already know what APIs are. If not, here is a short explanation:
API stands for Application Programming Interface.
- Application stands for user application. It is normally a program that you use on your computer.
- Programming represents that APIs are used for programming (or building) an application.
- 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:
- 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.
- 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:
One of the most popular forms of APIs is REST. REST stands for REpresentational State Transfer and is implemented over HTTP protocol.