Application Programming Interface (API)

by Sonam Singh 04-Mar-19

0 237


API (Application Programming Interface) is a software intermediary that allows two applications to communicate with each other. Each time we use any application like weather app, instant message etc, we are using API. When we use an application on our mobile phone, the application connects to the Internet and sends data to a server. Server retrieves the data, interprets it, perform the necessary actions and send it back to your phone. The application then interprets that data and presents the information in human readable form.


E.g: When we search for hotel online. We have variety of options to choose from. Different cities, departure and return dates etc. In order to book hotel online, we interact with Hotel's website to access their database and see if room as per our needs are available and what are the costs. Now see another scenario - we are using the hotel booking service like goibibo - which aggregates information from a number of hotel database. In this case goibibo is a hotel search API. 


Types of APIs:

a) Web Service API: Includes REST, SOAP, XML-RPC and JSON-RPC. REST stands for representational State Transfer and SOAP stands for Simple Object Access Protocol. These API provide services through the World Wide Web.

b) Source Code APIs: It includes Library based APIs and Class based APIs.

c) Objects Remoting APIs:  This uses remoting protocol such as CORBA (Common Object Request Broker Architecture). 

d) Hardware APIs: Helps to access the hardware level of device such as reading temperature, access inventory information.


History of modern web APIs:

APIs have been around since 1980s. Initially they were used in hardware and software development. However, modern APIs are just about 10 years old. There are several owners of web API, and they didn't necessarily invent any of the technologies at play here, they did popularize their usage. Some of those are:

a) Digital Gov university has recorded a verity of courses on how APIs can be used by government organizations.

b) E-commerce giants like Amazon, eBay

c) Social Network sites like Facebook, Instagram and Twitter

d) Amazon Web Services

e) Google Maps


What technology goes into an API?

APIs are driven by a set of specific technologies. APIs can work with any common programming language with the most popular approach to delivering web APIs as REST. APIs returns data in two forms, which are: 

1) Extensible Markup Language (XML)

2) JavaScript Object Notation (JSON)

Developers take this data and use in web and mobile application. XML and JSON are easily consumed by spreadsheets and other tools non-developers can use as well. This makes APIs potentially usable by anyone. The technologies which are commonly found in APIs were not designated by a single standards body or by a single company. It is based upon best practices of existing, successful providers over the last decade.

To learn more about APIs and how to design a great API, click here


Share:


Comments

    No Comments Yet.

Leave a Reply