What is an API?👨‍💻️

Mayur Patil
3 min readFeb 23, 2021

Nowadays, API is the buzzword of every business discourse. I mean everyone, regardless of the industry they’re in, is talking about it. And why shouldn’t they? It’s such an integral part of every modern business operating online. But, if you’re like me — someone who comes from a non-technical background — the word may sound like something right out of a sci-fi film. Here, just look at the standard definition of APIs -

“An application programming interface (API) is a computing interface that defines interactions between multiple software intermediaries.”

Did you get it? Probably not. However, it’s just some technical jargon for a rather simple concept.

Put simply, APIs are a software intermediary that allows applications to communicate with one another. It allows an application/service (client) to send a request to another application/service (server) using the API. The server then processes that request and sends back the response. If it requires any additional information, then the server makes a database query and sends back the appropriate response.

A real-life example of APIs would be PayPal. When a user makes a purchase from an e-commerce website and selects the ‘Pay with PayPal’ button, the website sends an ‘order’ request to the PayPal API, with order details like price, quantity, etc. After the user authenticates the purchase, the PayPal API sends the confirmation of payment back to the website.

Another popular, and my personal favourite, example of APIs is from Mulesoft.com.

Imagine you’re sitting in a restaurant with a list of food choices to order off the menu and the kitchen is a part of a system that prepares your food for you. In order for you to receive your food, you need someone to take your order, send it to the kitchen and deliver your food back to you. This is where the waiter comes in. In this situation, the waiter acts as an API that takes your food “requests”, tells the system, in this case, the kitchen what to prepare, and then delivers the response right back at you, which is, the food you ordered.

Remember, an API is designed only to take a specific set of inputs and based on that, send the output. Any discrepancy in calling requests will yield an unwanted response.

Types of APIs:

Source: Techno Merger

There are mainly four types of widely-used APIs. They are —

  1. Open APIs — These are publicly available APIs that can be used by developers both inside the company that made them or by any developers outside the organization who want to use them. These APIs are used by developers who build apps on top of the company’s public API. Example: Twitter has a public API that developers can integrate with their apps.
  2. Partner APIs — They’re similar to Open APIs except they require specific entitlement to access them. These APIs are usually exposed by/to the strategic business partners and require access to the onboarding process.
  3. Internal APIs — Also known as private APIs, these are created within the organization and can only be accessed by in-house developers. Internal APIs can be accessed by different teams for better productivity and reuse of services. Since they aren’t exposed to the public, these APIs offer a high degree of security and access control.
  4. Composite APIs — Composite APIs allows developers to execute multiple services and data API requests in a single call. They’re usually used in Microservices architecture pattern where you need information from several services to perform a single task.

(The article is simply meant to be a primer for people with non-technical background breaking into technical roles. If you aren’t satisfied with the article’s content or have some feedback for me, Hmu. Cheers!)

--

--

Mayur Patil

Writer obsessed with Products, Startups, and Technology.