What is an API?

preview_player
Показать описание
Want to learn how to build your first API in less than 10 mins? Click here to get started:

The textbook definition goes something like this:

“An application programming interface (API) is a set of routines, protocols, and tools for building software applications. An API expresses a software component in terms of its operations, inputs, outputs, and underlying types. An API defines functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising each other. A good API makes it easier to develop a program by providing all the building blocks.

APIs often come in the form of a library that includes specifications for routines, data structures, object classes, and variables. In other cases, notably SOAP and REST services, an API is simply a specification of remote calls exposed to the API consumers.

An API specification can take many forms, including an International Standard, such as POSIX, vendor documentation, such as the Microsoft Windows API, or the libraries of a programming language, e.g., the Standard Template Library in C++ or the Java APIs.

An API differs from an application binary interface (ABI) in that an API is source code-based while an ABI is a binary interface. For instance POSIX is an API, while the Linux Standard Base provides an ABI”.

To speak plainly, an API is the messenger that runs and delivers your request to the provider you’re requesting it from, and then delivers the response back to you.

To give you a familiar 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, and the kitchen is the provider who will fulfill your order.

What’s missing is the critical link to communicate your order to the kitchen and deliver your food back to your table.

That’s where the waiter (or API) comes in. ”AHEM”

The waiter takes your order, delivers it to the kitchen, and then delivers the food (or response) back to you. (Hopefully without letting your order crash if designed correctly)


Now that we’ve whetted your appetite, let’s apply this to a real API example. In keeping with our theme, let’s book a flight to a culinary capital – Paris.


You’re probably familiar with the process of searching for airline flights online. Just like at a restaurant, you have a menu of options to choose from ( a dropdown menu in this case). You choose a departure city and date, a return city and date, cabin class, and other variables (like meal or seating, baggage or pet requests)

In order to book your flight, you interact with the airline’s website to access the airline’s database to see if any seats are available on those dates, and what the cost might be based on certain variables.

But, what if you are not using the airline’s website, which has direct access to the information? What if you are using online travel service that aggregates information from many different airlines? Just like a human interacts with the airline’s website to get that information, an application interacts with the airline’s API.

The API is the interface that, like your helpful waiter, runs and and delivers the data from that online travel service to the airline’s systems over the Internet.

It also then takes the airline’s response to your request and delivers right back to the online travel service .

And through each step of the process it facilitates that interaction between the travel service and the airline’s systems - from seat selection to payment and booking.

So now you can see that it’s APIs that make it possible for us all to use travel sites. They interface with with airlines’ APIs to gather information in order to present options back to us

The same goes for all interactions between applications, data and devices - they all have API’s that allow computers to operate them, and that's what ultimately creates connectivity.

API’s provide a standard way of accessing any application, data or device whether it is shopping from your phone, or accessing cloud applications at work.

So, whenever you think of an API, just think of it as your waiter running back and forth between applications, databases and devices to deliver data and create the connectivity that puts the world at our fingertips. And whenever you think of creating an API, think MuleSoft.
Рекомендации по теме
Комментарии
Автор

I just realised i was an API and quit my job at the restaurant

Gcashama
Автор

Interviewer: What is an API?
Me: Well, its nothing but a waiter in a restaurant.

monochromehime
Автор

0:56 Exactly what happened to my brain when I tried looking up the definition of API, and exactly why I watched this video. It's crystal clear now. Thank you Mulesoft. You'll forever be in my heart.

erikbudrow
Автор

It's the people that are able to explain complex processes in a simple and elegant manner that truly understands. Everyone else outside of this simplicity, is sending us all into a dizzy technical spin. Thank you very much, absolutely stunning video!

kualamercedes
Автор

Perfect explanation + super clear animation. Neat as hell, neat as MuleSoft.

(why the hell am I doing this...)

victornaut
Автор

Excellent use of the waiter analogy for describing what an API does!

Centauri
Автор

This is Legitimately the BEST and CLEANEST Definitions of API. Thanks a Lot to Whoever came with this Example. :)

naveenperpaga
Автор

This 3 minute video taught me more than 4 weeks of school. Keep it up. :)

stephanieraymos
Автор

all takes is 3 min to explain this concept and some take 30 min 1 hr and you still don't get it . .. thanks

alelumelelu
Автор

Most Precise.Whenever I see API I'll surely think abt Mulesoft🤣

karthickshanmugavelu
Автор

Hence proved, learning in youtube is far better than learning in graduation 😂😂😂

manojkumarvavilapalli
Автор

After watching so many videos dealing with API's and programming.. this one by far takes the cake. Excellent video MuleSoft. You clearly explained a somewhat complex subject in under 4 minutes. You guys definitely know what you're doing. Liked and subscribed.

juliebrandsma
Автор

I typically hate having to search for explanations of things like this, dreading the poor explanation I'm sure to receive, but this was concise and clear, even with an analogy that perfectly framed the concept. Thank you so much!

jw
Автор

Okay. 1:04 is, without a doubt, _the_ single, most coherent answer to the question of what an API is that I've ever seen. Thank you so much, MuleSoft.

Valkinsenn
Автор

This is a award winning video for simplified API concept.Great job .

pankajkarmakar
Автор

this is the most elegant add u can see.

mrssslimer
Автор

I've studied it about 5 years ago, I just understood it,
perfect .. 10\10, thanks a lot

younisibrahim
Автор

1:01, i thought i increased the speed by mistake

ranjan_v
Автор

This was by far the easiest and most intuitive explanation I've seen. 10 on 10. Now I can go and look at the technical details with a much better understanding. <3

indianarchangel
Автор

Perfect video for non-technical people such as myself haha. Clean, simple, and descriptive! Well done

SANGI