What is an API?
To put simply, an API (Application programming interface) is a messenger that takes requests and tells a system what you want to do and then returns the response back to you.
For example, think of an API as a waiter in a restaurant. Imagine you’re sitting at the table with a menu of choices to order from, the kitchen is the part of the system that will prepare your order, what’s missing is the critical link to communicate your order to the kitchen and bring your food to your table. That’s where the waiter (API) comes in, the waiter takes your order (request) and tells the kitchen (system) what to do, then delivers the food (response) back to you.
This is how an API works. Although you may be unfamiliar with what an API is. You most likely have interacted with an API before, without even realising it. For example, when you are booking flights, you put in when you want to book the flight and where you want to go to. To book your flights you interact with the website’s interface, to access the airlines’ API.
This is what an API is, the messenger that takes your request to the database and sends the response back to you.