What is an API?

What is an API?

MuleSoft Videos

9 лет назад

5,050,473 Просмотров

Want to learn how to build your first API in less than 10 mins? Click here to get started:
https://developer.mulesoft.com/tutorials-and-howtos/getting-started/hello-mule

Checkout the MuleSoft Platform here: https://www.mulesoft.com/platform/api

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.

Тэги:

#Application_Programming_Interface_(Literature_Subject) #API #MuleSoft_(Business_Operation) #mulesoft #anypoint_platform #Technology_(Industry) #education #learning #what_is_an_api #api_testing #what_is_api_testing #apigee #mashery #api_management #api_best_practices #api_blueprint #api_framework #api_gateway #api_integration #api_proxy #rest_api #api_security #api_usage #api_versioning #raml #https://www.youtube.com/user/mulesoftvids
Ссылки и html тэги не поддерживаются


Комментарии:

Junbeom Bahk
Junbeom Bahk - 09.10.2023 22:10

Wait so is an airline website not an api?

Ответить
diego arroyo
diego arroyo - 09.10.2023 19:19

Marvelous ! Thanks!

Ответить
Genial Ingele
Genial Ingele - 07.10.2023 09:11

Beautiful.

Ответить
Den
Den - 05.10.2023 10:52

omg THANK YOU

Ответить
Karan Vyas
Karan Vyas - 04.10.2023 05:39

Best video I've ever watched from an API perspective

Ответить
Guyver Francis
Guyver Francis - 27.09.2023 08:49

absolutely spot on, thanks

Ответить
Devan Mauch
Devan Mauch - 26.09.2023 22:19

Thanks for making this educative video, learning python rn!

Ответить
MagedT
MagedT - 07.09.2023 15:25

I liked the idea of the waiter

Ответить
HABIGANJ KINGDOM
HABIGANJ KINGDOM - 02.09.2023 11:15

come from jhanker vai suggetion

Ответить
Md. Nahid Mahmud
Md. Nahid Mahmud - 27.08.2023 15:11

Just started learning API and my instructor suggested me to watch me this video. 😁😁

Ответить
Lishan ahmed
Lishan ahmed - 27.08.2023 06:49

Programming hero students 🥰

Ответить
MD. RIAJUL ISLAM
MD. RIAJUL ISLAM - 26.08.2023 15:53

I can only pronounce one single word. "WOW!"

Ответить
BEACON
BEACON - 04.08.2023 18:48

where are the captions?

Ответить
bolbol infosec
bolbol infosec - 02.08.2023 15:07

best explanation i did saw on the internte , thanks

Ответить
Clyde Forland
Clyde Forland - 25.07.2023 08:56

For this video being almost 10 years old, the animation and clarity was ahead of it’s time.

Ответить
Abdelrahman Mustafa - Abraida
Abdelrahman Mustafa - Abraida - 10.07.2023 06:07

I watched this video as part of my studying for the ScPro-Level-1 for the CSCMP certification program. Thanks to the Council of Supply Chain Management Professionals.

Ответить
virat venkatesh
virat venkatesh - 04.07.2023 15:22

thank you

Ответить
Aldorado
Aldorado - 25.06.2023 20:47

This was really a fun and cool way to explain what is an API. Thanks a lot 😄

Ответить
Pari Shah
Pari Shah - 16.06.2023 02:40

i do coding and i learned API

Ответить
Sruthi A
Sruthi A - 12.06.2023 17:20

Amazingly simple to understand! Thank you for the simple explaination

Ответить
Ishna 202
Ishna 202 - 02.06.2023 21:12

Explained in an easy and comprehensive way. Now I will never forget what API is

Ответить
Rafi Ilham
Rafi Ilham - 19.05.2023 04:20

Crystal clear for understanding the concept of API

Ответить
MKF
MKF - 16.05.2023 15:57

tight!!!!!!
🔥🔥🔥

Ответить
Ivan Zapana
Ivan Zapana - 14.05.2023 22:19

Examples of API? Mysql? 🧐

Ответить
Alejandro Rodriguez
Alejandro Rodriguez - 08.05.2023 20:26

To be a bit more specific and for clarification, an API is code that communicates with our database and then gives a response to that request? In the example of the flights, we send a request in the database to ask for available seats, then the database checks it's server for the information and then returns it to us. That's the gist of it, right?

Ответить
Denzel Braithwaite
Denzel Braithwaite - 05.05.2023 21:46

Wasn't expecting that MuleSoft plug at the end but great video.

Ответить
Rosana Castro
Rosana Castro - 03.05.2023 04:25

I"ve been an API for so long and I didn't know it! 😢😂

Ответить
piragna
piragna - 03.05.2023 01:13

beautifiul video wtf

Ответить
devash
devash - 20.04.2023 10:24

An API is hosted by a server, right? Therefore, shouldn't the communication flow be: client -> server -> API -> database | database -> API -> server -> client? I'm just confused with your analogy of API using restaurant. You didn't mentioned the server. Correct me if I'm wrong. Thank you!

Ответить
spicygamma
spicygamma - 18.04.2023 14:14

thank you very clear

Ответить
VinoTech
VinoTech - 01.04.2023 09:46

best video

Ответить
Programming Polyglot
Programming Polyglot - 31.03.2023 01:17

Fantastic and concise explanation. Thanks a lot.

Ответить
Oluwarotimi Williams
Oluwarotimi Williams - 30.03.2023 19:49

brilliant

Ответить
Samsel Arfin
Samsel Arfin - 30.03.2023 12:01

This is a great video forever.

Ответить
Junayed 3294
Junayed 3294 - 25.03.2023 12:19

(:

Ответить
Volodymyr Korolov
Volodymyr Korolov - 22.03.2023 22:34

oh, now I actually got it

Ответить
Prince Kumar
Prince Kumar - 22.03.2023 08:26

connectivity only is allowing us to taste the u tasted

Ответить
Asif Hossain
Asif Hossain - 18.03.2023 20:17

Thanks to the waiter for saving my brain and time both

Ответить
Shareed AB
Shareed AB - 18.03.2023 17:35

Best explanation, well done

Ответить
vasco muijsers
vasco muijsers - 09.03.2023 12:40

damn that was crystal clear. Thanks lady

Ответить
20BCM538_ PRASANTH
20BCM538_ PRASANTH - 01.03.2023 12:00

this video is life saving

Ответить
Ahmed Rahi
Ahmed Rahi - 23.02.2023 14:12

Who is came from Programming hero?

Ответить
shivani arora
shivani arora - 22.02.2023 16:54

How API were being created a few years ago when mulesoft was not there ….

Ответить
Diego Escobar
Diego Escobar - 19.02.2023 05:45

Hi, I have a doubt about this explanation. Is the API really the "messenger" or just the "gatekeeper"? Let me put a different example

Let's say I do a search in Expedia and request all the travelling options from Chicago to Miami from different airlines

This order must travel from Expedia to each of the airlines (AA, Delta, etc) and then returns an answer

In this example, what is the API? The whole channel that connects Expedia to the Airlines, asks them to process a query, and then return the information? I am not so sure about this. I think the "channel" that connect Expedia to the Airlines is something else (Middleware perhaps?), and the APIs are the "gatekeepers" on the Airlines servers that receive the order (important: just receive the order, NOT taking it from the initial point to the server) and then send it to the services to process an answer. In this case, the API is not the "messenger", but the "gatekeeper". Otherwise, each "Expedia" would need to develop a new API if it were to connect to the Airlines servers, right?

Your answers would be trully appreciated!

Ответить
Stefan Rodrigues
Stefan Rodrigues - 07.02.2023 09:57

Great explanation! :)

Ответить
CatFox
CatFox - 02.02.2023 17:26

And Twitter now wants us to pay for theirs

Ответить
Sergio B
Sergio B - 25.01.2023 14:36

This is the clearest and simplest explanation of an API! I just couldn’t work my mind of what it was before I ran into your video. Already subscribed 😊

Ответить
space_2n
space_2n - 22.01.2023 18:39

what app they use to do like these videos??

Ответить