Ticker

6/recent/ticker-posts

What is API

What is API ??



In this blog I am going to break down exactly what an API is in both non-technical and technical terms.Then I am going to go over a few examples of the most common forms of APIs that programmers interact with.

In today's blog I'm going to be talking about what an API is both in general and related specifically to web development let's get started now to get started.

API stands for application programming interface which is just a fancy way of saying what one application exposes to another that is the API let's take an example of a restaurant to describe how an API works in non-technical terms so when you go to a restaurant you don't go directly up to the chef and tell him what you want to order you need to look at the menu and order something off of the menu because the menu tells you what the restaurant offers that is their API this menu the API essentially tells you what that certain application is giving to you and the things that you can use from the application so you go to the restaurant and you order something off of that menu then after you order something from that menu you tell them what you want that restaurant is going to give you whatever you ordered off of that menu they're gonna give you back data. 

So when you access an API that API you're going to send it what you want and then it will send you back information based on what you want it but if you go to this restaurant for example a steak restaurant and you try to order a peanut butter jelly sandwich they're going to throw an error at you they're going to tell you we don't serve peanut butter jelly sandwiches you have to choose something on the menu and this makes API is secure because they only expose what you want to expose to the rest of the world for example a web application is not going to expose to you the database with all the users information and passwords they're only going to expose to you the login and sign up pages and not the actual database itself this makes that website secure because they're only exposing the parts that they want to some of the most common forms of ap is that you'll run into as a developer are going to be rest api's on the web and library api's from code that you pull into your project.

let's first talk about these web api's which are going to be most likely rest api x' these api is expose different endpoints also known as URLs which you can access to get certain data from that API you can also access these endpoints in order to modify data on these servers but it only is what the application actually exposes to you and wants to you modify for example you may be able to update a user through a REST API but they're not going to let you update the password they're only going to let you update the name and the email for example you also will be able to get users from this API but they're not going to return to you the password of the user they'll just give you the name and the email this is a way that these servers can be secured by only exposing the information.

they want through this API which is the contract that the server and the client are having between each other the other most common API which is not really referred to commonly as an API but is still technically an API is an actual library that you pull into your code these libraries have a bunch of different methods defined on them that do specific things when you call them and return to your specific data and when you call them this is exactly what an API is it's a contract between this library code that you've installed and your actual project that's using that libraries code you have different ways that you can access it only the methods that they expose and you aren't able to access the internals of that library unless it's through the methods that the API of the library exposes to you the common theme with aap is is that they only expose to you exactly what they want you to be able to access and hide away absolutely everything else that they can in order to make their API as secure as possible also commonly with web APRs .

you're going to need some form of token to authenticate yourself with this API which will allow the application to know who's accessing the API in order to limit what that person can access based on their specific permissions in conclusion API s are absolutely everywhere from technology to non technology related fields and it's really just a contract between two things with how they can interact with one another it's mostly used to make things more secure and easier to use because you know how you can use something and it hides away all the stuff that you cannot access which makes it secure and that's all an API is if you guys enjoyed this video please make sure to check out my other videos which are going to be linked over here and subscribe to the website for more blogs just like this thank you guys very much for reading and have a good day

Post a Comment

0 Comments