API ? What is it ???

Hi there, you are here today to embark on an awesome journey to understand what are APIs. Lets begin our journey by simply understanding the basics and later we can move on to differentiate words like REST and SOAP. (If the words scare you don't be. We are here to learn while having little bit of fun 😛.)

Okay, now lets get on with learning. Before go into details lets watch a quick video outlining the fundamentals of API.

What is an API?

🤔 Waiter == API 😵

Oops.. We forgot to state the longterm of the API (Yeah, 😒 Devin you forgot). Lets get on with the name then. API stands for Application Programming Interface. If you are involved with Computer Society then this terms will be so much familiar to you. But the problem with us is we are very opinionated. Lot of the Computer Science guys assume every one in the world knows about APIs.

But frankly, world is waiting for you to teach them. So, I got a task for you my friends. If you grab the essentials about APIs here, open your heart 💓 and spread the good will by teaching what you learned for others whenever you get the chance.

After getting little side tracked there, lets move on with our journey. If you are a technical term savvy person below is the API definition according to Wikipedia.

In computer programming, an application programming interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication between various components.

Okay, if you were able to grab the general idea from that, then you are the man 💪 , but if not don't worry, you and I are on the same boat my friend.

Best way to understand the concept of API is to do it with a example. Lets take the example from the video above. In that we talked about a Restaurant. What we do when we go to a restaurant, you guessed it we order foods. The waiter will take your order and inform the kitchen about your order.Now, you have managed a connection with the kitchen via waiter. Also, waiter will get deliver your food after the kitchen prepares it.

Lets model this example with the API process. API is the messenger that takes your requests (like waiter taking your order) and tells the system what you want to do (telling the kitchen how you would like your food) and lastly return the response from the system back to you (in our example, a tasty plate of food 🍜).

Following is a rough sketch of the idea we talked above.

How API Works

So, basically if we are a programmer we will be using the API to communicate with the application.

Relationship between Programmer and API

Types of API

When we take a look at the APIs we can differentiate them into three main categories.

  1. Public APIs
  2. Partner APIs
  3. Private APIs

Following image will help you to differentiate these types quickly with ease of mind 🧐.

API Typology

So, guys this is a very brief discussion on API, we will meet with more posts like this.

Till then take a look at this article to develop your own Hapi based API.

👍