What is an API?
Dinuka Fernando
Associate Technical Lead at Axiata Digital Labs| Speaker | Blogger
Technically the term API stands for Application Programming Interface.
API is a messenger and It sends requests to the system ,then the system proceed and return response back.
Application Programming interface allows one piece of software to make data available to another.
Most large companies have built their own API’s to use their customers.
Many Modern API’s adhere to standards (HTTP and REST).
Let's take a familiar example
Think of an API as a waiter in a restaurant,Imagine you are sitting at the table with a menu of foods, and the kitchen is a part of a system which will prepare your orders.
In here you and the kitchen should be link together(need to communicate with each other) so there should be a link to connect you and the system,this is the place where waiter(API) comes in to role.
Waiter takes your request(order details) to the kitchen and the request is proceed in the kitchen.
Then the proceeded order(response) delivers back to you by the waiter(API).
Real life example:
Think about the process of searching flights online.Then you can find variety of options, like different cities, departure,return dates and etc.
Let’s imagine that you’re going to book a flight by using an airline website and you choose a departure city and date, return city and date, class of the cabin. Then you willing to book your flight so you have to interact with the airline’s website to access their database and see availability of your prefer.
Think that you are not using the airlines website which does not have direct access to airlines database.As a example online travel service .
Online travel services cannot directly access airlines database,so online travel service need to have intermediate person to connect database and you.This is the place where API comes to role.
Online travel services uses airlines API to send your request to the system and return response back to you.
Ex:- You need to book a flight, but you are using the travel service and you need to get an availability of your preference( you choose a departure city and date, return city and date, class of the cabin).
Online travel service uses API to interacts with the airline’s database according to your request then its return response back to you.
You will get latest updates without directly accessing to airlines database.
API provides a layer of security for both end user and to the organization.As a example think your mobile device and one of a system communicates through an API.In here your data is never expose the system server and also system data never expose to your device.
It uses small packet of data which uses to execute process.
Modern API’s treated more like product than a code .Its design for specific audiences like mobile developers.
This is the basic idea of an API and how it’s acts like.
Hope this article was helpful :)
Technical Lead at Crédit Agricole CIB
5 年Good one