API

The term API is pretty common on the internet, and most people still really don’t know what it means. You might find yourself pondering what exactly an API is, what it does, or maybe even how one is made. Well, ponder no further; in this article, I will discuss everything you need to know about APIs in the most basic way I can.

What is API?

The term API is actually an abbreviation for Application Programming Interface. It is a program that, to put it simply, allows applications to communicate with one another. To explain exactly what an API is, we first need to understand how the web works. The internet can be viewed as a large network of connecting servers. Every single page on the internet exists on an independent remote server. Remote servers aren’t anything too complex; they are just computers that have web pages reserved for receiving and processing requests. Even your basic laptop has enough juice to host a website for the whole internet ( this is actually what happens in most cases as web developers use laptops to generate and test webpages before public release).

When you put a URL like www.facebook.com into your browser, you are actually sending a request to Facebook’s remote server. Facebook then sends a response which your browser interprets to make it display the login page. In this case, you and your browser are the clients, and Facebook’s server is the API. With this explanation, it means that every time you open a web page, you are directly interacting with the API for that website’s server. The API isn’t the same thing as the remote server; as most people assume, it is actually just a part of the server responsible for receiving and responding to clients’ requests.

APIs are used by small and large organizations alike and are everywhere on the net. APIs are used. For various client-server interactions. A simple example is as follows;

Imagine a small organization that lets clients sign up for appointments by completing a form. This organization wants to make it convenient for their clients by automatically creating a google calendar event and reminder for their appointments. To achieve this, they rely on a simple API. This API will communicate directly with Google’s server and request to create an event with the relevant details. This triggers Google’s server to send a response that will go back and forth to meet requirements until the reminder is created on the Google Calendar.

Another reasonable example would be airline booking. When searching for flights on the internet, you have a long list to choose from different filters. Cities, departure and return dates, departure city and date, a return city and date, and cabin class are all things you’d concern yourself with when choosing a flight. To book a flight, you have to interact with the website’s database to see if seats are available for your preferences and compare costs. The thing is, when searching for flights, you hardly ever seek out one airline. You use travel platforms like Trivago and Expedia to search for flights from a variety of airlines. So how do these middlemen get the relevant information? They interact with the APIs of each airline.

The airline’s API can be likened to a patient waiter at a 5 -star restaurant. The travel platform asks to get relevant information from the airline’s database through basic questions and filters. The API takes these questions (requests) and gets the airline’s response delivered back to the travel platform, which shows up on your browser as an updated page with the relevant information.

 APIs also help create a Layer of security.

With an API, your phone’s data is never fully exposed to the server. It also works the other way around as the server is never fully exposed to your phone. Instead of a direct link, they each send small packets of data, sharing only necessary information. Again, like a restaurant, you only need to tell them what you need, and they tell you their requirements, and that’s it; a seamless transaction on information takes place.

APIs are valuable pieces of programming, and some APIs form a large part of many large companies’ revenue. Google, eBay, Salesforce.com, Amazon, Expedia, and others’ loots are examples of companies that dominate their market because of their unique APIs. There’s even a Marketplace of APIs dubbed the “API economy.” 

The Modern API

Since they became a big deal, APIs have evolved, and an “API” is commonly described as any generic connectivity interface to an application. However, modern APIs have become more advanced in recent times and have taken on some more complex characteristics that make them extraordinarily more valuable and useful. Here are some of those characteristics.

Nowadays, APIs are written to adhere to standards (typically HTTP and REST). These languages are developer-friendly, easily accessible, and understood broadly.

APIs are no longer viewed as codes but are now seen as products. They are designed like packages and have features for consumption for specific audiences (e.g., mobile developers). They are documented, and they are versioned so that users can have certain expectations of its maintenance and life cycle.

Modern APIs now adhere to various standards, and as such, they have a much stronger discipline for security and governance and are monitored and managed for performance and scale. This means that the Modern API scene is more tightly written.

Now that APIs are viewed as a product, they have come to have their own software development lifecycle (SDLC) of designing, testing, building, managing, and versioning.