Lets explore a bit about API

So what is API? Its basically a mechnaism than enables two software to communicate with each other using a set of protocals.

The word API -- stands for Application Programming Interface.So breaking this word down application means any software with distinct function.And interface means the contract of services between two applications. This contract defines how the two communicate with each other using requests and responses.

The four principle type of API commonly used in web based applications are as follows

  1. public
  2. private
  3. partner
  4. composite

There are four different way on which API can work depending on when and why thye were created

  1. SOAP APIs These API are simple object access protocol .The client and server exchange message using XML.

2.RPC APIs THese APIs are called Remote Procedure Calls. The client completes functions on a server and the server sends the output back to the client.

3.WebSocket APIs Its a moder API develpoment that uses JSON objects to pass data.It supports two way communication between client app and server.

4.REST APIs These are most popular and flexible APIs found today .The client send request to the server as data . THe server uses this client input to start the internal functions and return output data back to client.