APIs Explained (in 4 Minutes)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you work in Tech or in anything adjacent attack you've probably heard the abbreviation API being thrown around so let's talk about apis what are they and why do we need them let's start with what is an API API stands for application programming interface fancy words so let's break it down application in this context just means any software that has a specific functionality or purpose interface refers to a contract or a protocol that dictates how two applications talk to each other using requests and responses so put together an API is simply a way for different systems or applications to communicate with each other okay cool in theory so why do we need apis let's start with a non-technical analogy first let's say you have a dinner reservation for tonight for three people but you want to change it to six because some friends decided to join you at the last minute so you call the restaurant ask them if it's possible to do that and the customer service person puts you on hold it takes a minute but they finally come back and they say yes simple you called someone made a request and you got a response yes or no now let's say that there was no customer service person and that it was up to you to figure out how many people have made reservations for the same time at this restaurant how many tables do they have free at that time what's their kitchen capacity what's their weight staff capacity all to figure out whether you can add three more people to your reservation that's a lot of unnecessary work on your part work that you the customer have no expertise in and it means that the restaurant has to reveal a lot of data to you maybe even private data about who's eating there that night and who works there Etc in this analogy the restaurant is an application that provides a specific service or function which is to feed you you are an application that is trying to get fed with a group of friends the customer service rep from the restaurant is the restaurant's API that is the interface through which you can communicate with the restaurant and make requests like changing the number on a reservation and you can do that without having to dive into the messy details about how restaurant reservations work or anything like that for more technical example now think about Apple's weather app do we think that Apple decided to set up weather monitoring stations around the world that's a really expensive Endeavor and if it was super critical to Apple's business model then maybe sure we could we could see that happening but there are already Services out there that meticulously collect global weather data services like weather.com so if weather.com creates an API through which anybody can access their data but only in the ways that weather.com allows then Apple could just use that API to populate their weather app so how do apis actually work let's use the example of web apis which are the type of apis that deliver client requests and return responses via Json or XML usually over the internet each request and response cycle is an API call a request typically consists of a server endpoint URL and a request method usually through HTTP or hypertext transfer protocol the request method indicates the desired API action the HTTP response contains a status code a header and a response body the response body varies depending on the request and it could be the server resource a client needs to access or any application specific messages one status code you might be familiar with when you've tried to visit a website that might be down or doesn't exist anymore is the error 404 code URL not found and that's it request response to get more in depth about apis and the various different types that exist I encourage you to check out the exponent article Linked In the description below good luck with your interviews and thanks for watching thank you foreign
Info
Channel: Exponent
Views: 712,782
Rating: undefined out of 5
Keywords: yt:cc=on
Id: bxuYDT-BWaI
Channel Id: undefined
Length: 3min 57sec (237 seconds)
Published: Mon May 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.