Unable to understand what is API

Hi, I have a doubt regarding APIs and what are they. Please clarify my doubt.

Hi @vijayolivefloor,

We have previously answered a similar query. Please refer to What is an API? - #3 by career_niecit2008. You can also refer to this workshop video https://www.boltiot.com/workshops?wchannelid=7pszk643nd&wmediaid=cew01q3y21 from 8:00 Timestamp.

Do let me know if you still do not understand.

An API is a set of defined rules that explain how computers or applications communicate with one another. APIs sit between an application and the web server, acting as an intermediary layer that processes data transfer between systems.
When you use an application on your mobile phone, the application connects to the Internet and sends data to a server. The server then retrieves that data, interprets it, performs the necessary actions and sends it back to your phone. The application then interprets that data and presents you with the information you wanted in a readable way. This is what an API is - all of this happens via API.

For further more clearance refer : What is API: Definition, Specifications, Types, Documentation | AltexSoft

Thank you @yadavbhavya736 and @shobhit.kumawat, your comments helped to solve my problem. :grinning:

An analogy for API is a the menu you get in restaurants, the menu shows a list of foods the restaurant can cook for you, your order for the food is passed on the chefs through waiters, then when the chefs have prepared your food they will send it to you through the waiter again.

Here,
You are Client,
Menu is API,
Waiter is HTTP protocol,
Chef is Server.

API (application programming interface), is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices.

API stands for Application Programming Interface. API acts as a messenger between the applications which are communicating with eachother. Generally the exchange of data between applications is done using HTTP (hypertext transfer protocol) and the complex data which is being exchange back and forth between applications is represented as eXtensible Markup Language (XML) or JavaScript Object Notation (JSON). But the applications cannot exchange data directly there must be some contracts to do so and such application to application contracts is Application Programming Interface (API).

@vijayolivefloor
An API can be compared to your bank’s ATM.
Just like an API, banks will make them accessible so you can grab your balance, withdraw cash and make payments at your convenience.
Before you can do anything, though, you’ll need to authenticate ( use your card and put in your PIN) so the bank knows you’re authorized to transact.
Similarly, with an API, you’ll send a request to the system along with your authentication and, if you’re authorized, you’ll receive the data you requested – the cash money.