Sulav Jung Hamal - Blog - 2023/11/07 -
An API
or Application Programming Interface
is a software/code/rules/way that allows two application to communicate with each other. It can also be described as a document or standard that allow other to know how to communicate with your devices. It is like gate to your house. If you have keys, you can easily enter and navigate inside. Key here represents API specification
or a document that describes how to use such a connection or interface.
The history of APIs (Application Programming Interfaces) is a fascinating journey that has evolved over several decades. APIs have gone from being local tools for operating systems to becoming crucial components of the digital age, enabling remote integration of data and services. Here's a brief history of APIs based on the provided information:
To look deep into how APIs work, let's start with an imaginary Weather application. Imagine you have a weather application on your smartphone (the client), and you want to display the current weather for your location. To do this, your weather app needs to get the latest weather data from a weather service provider's servers (the server) using their API.
request
from your weather app would be to retrieve the current weather for your city.endpoints
for different weather-related functions. One of these endpoints is designed to provide current weather data for specific locations.API key
that your weather app uses to identify itself to the server and access the data. The server validates this key.processes
your request, which may involve querying its weather database for the latest weather information for your location.structured response
to your weather app. This response includes the current temperature, conditions, and any other relevant weather data.In this scenario, the API serves as the bridge between your weather app and the weather service provider's data. The API defines the rules for requesting and receiving weather information, ensuring that different applications can communicate effectively. It's a simplified example, but it illustrates the fundamental concept of how APIs work to enable software systems to interact and share data.
2 mins to finish this blog.
546 words read. Hooray!
Computer Science
Sulav Jung Hamal - 2024/08/20