Table of contents
API:- POWERS COMMUNICATION BETWEEN SOFTWARE ON THE INTERNET
API
API stands for "Application Programming Interface. It is essentially a set of rules (protocols) that define how different software can interact with each other.
Example
Let's say you want to build a website in which you can get the weather details. So there is a company called OpenWeather that stores and captures weather data. They have the weather data available in their database and it is available for all the locations in the world. Now You want to communicate with the company servers and get the weather details on your website. So that's when API comes into the picture.
OpenWeather creates an API that tells us how we can interact with the company services. If we pass the Latitude and Longitude of the location we want it will provide the details of that location.
Details we get back can be temperature, and weather icons (cloudy, rainy etc).
All we have to do is make a request from our website through this API.
It is simply we are making a GET request to get some data from OpenWeather and in the response, they send back some data.
API tells us how we can make these requests and how the data that come back is structured.
Different Types of API
GraphQL
SOAP
REST API
gRPC and many more
We have different architectural styles for creating an API.
Role of API
Data Integration:- API used to connect various data systems
Web Development:- Allows developer to connect and access data from servers
App Development
Cloud Computing:- used for deploying, scaling etc
IoT:- To communicate with a cloud-based platform
Conclusion
API is an interface by which we can communicate between two different software. By using API we can get different access that is authorization, authentication etc.