Hi, I have a doubt regarding APIs and what are they. Please clarify my doubt.
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
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.
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.
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.