API. What’s this tech acronym stand for? Aggressive purple Ibex? Aardvarks parkouring intensely? Nope! API stands for application programming interface. Hey y’all, I’m Kyle, and today we’ll be talking about API basics. For more info on this topic, visit our website at technologyadvice.com for our corresponding article on APIs. Click on the annotation in the top right corner of your screen to get started. And if you find this video helpful, click that like and sub button down below.
To understand APIs, we’ll talk about what they are, how they work, and some of the types of APIs you’ll likely run into. APIs are basically how computers talk to each other. One computer has info, another computer wants that info, and they use an API to both ask for and receive that exchange of data. There are three main entities involved in this process. The user, or the person who makes the request. For our purposes, this is you. The client is the computer that sends out a request for data.
This would be your PC, and likely, with the assistance of an API client. And lastly, the server is the computer that stores the data that needs to be accessed. So, this would be any of the websites or whatever else has information that you want access to. APIs are often used in the background of different apps that allow them to ‘talk’ to each other, passing information back and forth in a way that both systems can interpret and display the information.
You’ll often hear of software that offers both integrations with other software AND offers an API, so that IT professionals can manually access the info they need from the software for whatever processes are relevant to them. For example, let’s say you have a CRM, or customer relationship management system, and you want the information stored in it to be featured on your BI, or business intelligence, analytics tool. By accessing the data within the CRM and having it communicate with the BI, all of the data could be consolidated into a single spot, making things look nice, clean, tidy, and convenient.
Despite the fact APIs are foundational to so many different technical operations, the language of APIs can be boiled down to four main functions, also known as HTTP verbs: GET which requests data from a server POST which sends changes from the client to the server; think of a POST request as adding information to the server, like making a new entry PUT which revises or adds to existing information And DELETE which deletes existing information These HTTP verbs are the primary player in the first of three parts in an API call.
The API call is the name given to the entire process of requesting info, retrieving that info, and then delivering that info. The first part is the only bit that would involve you. Like I mentioned, to do an API call you’d need whichever HTTP verb or verbs are relevant to you, as well as the URI, or universal resource indicator of the server. Think of that like the address of a place you’re trying to send a letter to. Even if you have the coolest, most well written, and prettiest letter in the world, it won’t do you much good if you don’t know the address to send it to.
That address is the URI. Then it’s best practice to tell the server about the request and response you’re looking for with something called a header. And lastly you’ll need an API key. This is basically like a password or an identifier that is unique to the client that lets the server know you’re authorized to access the information you’re requesting. While not terribly common, there are some servers that do not require an API key to access their info, but more often than not you’ll need one.
Once you’ve submitted a request, you’ll get a status code back. This is basically shorthand letting you know if your request worked. So it’ll either tell you “yeah that works” or “nope, it didn’t, and here’s why.” Typically, successful status codes start with a 2, and unsuccessful ones start with a 4. One that you might already be familiar with is 404, which is typically used by a server to say “hey we couldn’t find what you were looking for.” APIs are generally divided based on their architecture.
The two most common types are known as SOAP APIs or REST APIs. SOAP stands for Simple Object Access Protocol. This API is used for its rigid structure and independence from any specific programming language. It’s not as popular as it used to be, but there’s still a significant amount of organizations that use SOAP APIs. REST stands for representational state transfer. This API is well liked because of its flexibility. There are also RESTful APIs, which have all the features of REST architecture but it also makes cached info accessible at any time rather than displacing it if left unused.
While this does provide unique features, it also makes it less secure. That wraps up our high-level overview of APIs. Thanks for watching! Make sure to hit that like and sub button down below if you found this video helpful. For more info on this topic, visit our website at technologyadvice.com for our article on how to use an API. Click the button on the left to get started.