What is API

An API is an interface between software programs that facilitates interaction the way a user interface facilitates interaction between humans and computers. An application program interface that provide a developer with programmatic access to a proprietary software application. A software intermediary that makes it possible for application programs to interact with each other and share data.

How does API works?

API working is simple it take request, the process it and send back to the response.

API Workflow

Lets take an example to understand it better.

Lets say you are in italy and you hungry, you go to bakery shop and want to have cannoli but you don’t know how to speak italian. Below image will show you how you request is being processed and end user get the response.

API workflow example


API Protocols

Basically there are thee type of protocols, which are as follow.
1. REST :

Representation State Transfer is a simple way of sending and receiving data between client and server and it doesn’t have very many standards defined. You can send and receive data as JSON, XML or even plain text. It is light weighted as compared to SOAP.
A RESTful API explicitly takes advantage of HTTP methodologies defined by the RFC 2616 protocol. They use GET to retrieve a resource; PUT to change the state of or update a resource, which can be an object, file or block; POST to create that resource; and DELETE to remove it.

2. SOAP:

Simple Object Access Protocol is a method of transferring message, or small amount of information over the internet. SOAP message are formatted in XML and are typlically sent using HTTP(hypertext transfer protocol).
SOAP calls are much more likely to get through firewall servers, since HTTP is typically Port 80 compliant, where other calls may be blocked for security reasons. Since HTTP requests are usually allowed through firewalls, programs using SOAP to communicate can be sure that the program can communicate with programs anywhere.

3. Javascript / XML-RPC

API Protocols


API History

Web APIs first appeared in the world with the introduction of salesforce on February 7th , when the company officially launched its APIs at IDG demo 2000 conference.

API History


API Call Chart 

Big company like twitter, facebook, google and many other stalwarts of the internet depend heavily on the infrastructure they have built via their respective APIs.

API Call Chart

Comments

Popular Posts

How to position controls using Canvas control in WPF using MVVM

Change font and size in visual studio

JWTs in ASP.NET Core 2.0