paint-brush
What is an API, Simply Explainedby@Andynarf
1,641 reads
1,641 reads

What is an API, Simply Explained

by Andres RodriguezMay 15th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

An API: Application Programming Interface makes every interaction possible. API is the messenger, that tells the system what you want to do and then returns a response. API makes it possible for computers to operate them, which ultimately creates connectivity. API also makes us possible to know about the weather, track a package or order a package. API: Applications, data and devices all have an API making it possible to operate and connect them with each other. API is an interface that, like your waiter in a restaurant, can be asked by this app to get information from the weather system over the internet.
featured image - What is an API, Simply Explained
Andres Rodriguez HackerNoon profile picture

Connectivity is something amazing. Right now, we are used to use our computers or phones to buy, post, watch, etc. We can do lots of things actually. We are connected to the world and to each other.

But, how does it actually work?

How do we get our data moving from a place to the other?

How is it possible to place an order, know the weather, or track a package?

The thing is, behind all of theses actions there's is something working under the hood, our real hero: the API: Application Programming Interface and it makes every interaction possible.

Ok, so... What is an API ?

To put is simple, an API is the messenger, that tells the system what you want to do and then returns a response .

Imagine you are in a restaurant sitting at your table: the kitchen would be the system, processing your orders; you can't go there yourself, you need a waiter, a messenger to take your request to the system (the kitchen), and then bring back its response (your food) .

Great, so let's see a real API example

I think that, at some point, most of you have used a forecast app, something like this:

but... how does it work? How does this app know all this information?
Well, it's actually pretty simple: it doesn't.

What it actually does is to connect with the real MVP here: the weather API.
This API is the interface that, like your waiter in the previous example, can be asked by this app to get information from the weather system over the internet about temperature, climate or humidity (your order). It also takes the system response to the request (your food) , and delivers it back to the weather application, which then shows it to you.

So what now ?

Now you can see that it is APIs that makes us possible to know about the weather.

The same concept applies to every interaction between applications , data and devices. They all have APIs making it possible for computers to operate them, which ultimately creates connectivity.

So whenever you think of an API , just think of your waiter running back and forth between applications with requests, and getting back responses.