You Must Have Heard of APIs...Here's What They Mean

The acronym API stands for Application Programming Interface. An API is a piece of software that allows software applications, digital services, and data servers to talk to each other. Applications use APIs to send and receive data and content between each other.

API integration is the connection between two (or more) applications, programs, services, or systems using APIs.

Some common benefits of using APIs include:

  • Rapid software and system development
  • Reduction of operating costs
  • Reducing downtime and nonperforming systems
  • Systems Integration
  • Enhancing the functionality of internal and external systems
  • Decreasing software development costs
  • Improving software and system testing, and so on.

How do APIs Work?

API sits between an application and the web server, acting as a middle layer that processes data transfer between systems. The working of an API can be explained in three simple steps:

  1. The client application sends a "request" to retrieve information- It does this by initiating an API call which is processed via the API's Uniform Resource Identifier (URI) and includes a request verb, headers, and sometimes a request body. The API then redirects the call to an external program or web server.

  2. The server sends a response to the API with the requested information.

  3. The API transfers the data to the initial requesting application.

Consider the following narrative. You walk into a bar down the next street to order your favorite Vodka. You are approached by a waiter dressed in crisp white and bow tie who then takes your order and returns a few minutes later with a glass of Cîroc Vodka- your top choice.

In this scenario, the waiter is the API that takes the 'request' from you- the program or application- sends it to the barman (server) who processes the order, and sends the fulfilled request back to you via the waiter. Simple right? We can see that an API serves as a middleman that facilitates the abstraction of functionalities between two systems i.e. it decouples the requesting application from the infrastructure providing the service.

API 1.jpg

API calls are enhanced with security layers that include authorization of credentials to reduce the risk of attacks on the server, minimization of access to the API gateway, and also the use of HTTP headers, cookies, and query string parameters.

Classification of APIs

Classification by Availability

  • Private APIs

These APIs are used only within an organization. In-house developers or contractors have access to the API but not outsiders. This allows the company to fully control the API usage. A common use case is the integration of a company's IT systems or applications.

  • Partner APIs

These APIs can only be used amongst business partners or users who have a contractual agreement with the API publisher. A company that grants partners access to data or capability benefits from extra revenue streams. Software integration between two parties is a typical case where partner APIs may be used.

  • Public APIs

These APIs are available for any third-party developers. They are typically used for brand promotion or to generate additional income when properly implemented. An open public API is completely free of charge. They can be used without any restrictions and any approval or compulsory fees from the API publisher. Also, the API documentation and every other related item are made available to the public for free. A commercial public API requires a subscription fee or some other form of payment for usage. Publishers usually offer free trials to prospective users to test the API before making a subscription.

Classification by use case

  • Database APIs: These enable communication between a database management system (DBMS) and an application. For instance, a database API might help developers to write unified queries at the same time for different database systems like PostgreSQL, MySQL, Oracle, etc. The ORDS database API is a common example.

  • Remote APIs: They are used to standardize interaction for applications running on different machines. That is, one software product gains access to resources located outside the device that requests them. The Java Database Connectivity API is an example of a remote API.

  • Web APIs: These are the most popular kinds of APIs. They mainly send requests from web applications and deliver responses back from servers using Hyper Text Transfer Protocol (HTTP). They can be used by software developers to extend the functionality of their apps or sites. For instance, the Google Maps API enables the addition of a map with an organization's location.

  • Operating Systems API: They are used to determine how applications use the resources and services embedded in an operating system (OS). Every OS has its set of APIs e.g. the Windows API and the Linux API.

    API Documentation

API documentation is simply a reference manual or guide that shows developers/users how to work with the specific API. It includes such information as the functions, classes, return types, and arguments found in the API code. Documentation can either be static or interactive depending on whether the API code can be tried out with results in real-time or not.

Common examples of APIs are the Google Maps API for generating location data and the weather API which is a free geolocation and weather information provider.