Get familiar to applications of API

We are familiar with the term API which is very commonly used in software development. It will be interesting to share more information for a better understanding of API and its real-time applications.

‘API’ is the acronym for Application Program interface and it is defined as a set of routines, protocols, and tools that help a software application to access data of an operating system or another application or service. It also allows one application to communicate with another. When we use an application on phone, the application connects to the internet and sends data to a server. The server retrieves and interprets the data, performs the necessary actions and send back to phone. The application interprets that data and present information to us. This happens via API.

Today people are moving from the web towards the app world with the popularity of iPhone and Tablets. For the data to be accessible by all these different devices, there must be an API that is compatible with all browsers. Google, Twitter, and Facebook have an API for web application and mobile apps. Web API is a framework that uses full features of HTTP that include URLs, request/response headers, caching and it doesn’t need to define extra config settings for different devices. We can build web API using different technologies such as Java, ASP .NET, etc.

We have seen “Share on Facebook” or “Share on Linkedin” buttons on various websites. When this button is clicked, the site we are visiting will communicate with our Facebook or Linkedin account and add a new status or post. This is an example of the API application.

 

Another type of API application is where we are using our phone’s camera API to take pictures and the Google Maps API uses the phone’s geolocation API to know where you are located. In these examples, it is seen that one application requests services from another application.

Now take the case of booking tickets online for a movie. While you provide your credit card information, movie ticket booking website uses an API to send your credit card information to a remote application that checks given information is correct. Once the payment gets confirmed, this remote application will send a response back to the ticket booking website to issue tickets. For the user, he sees only the movie ticket booking website but many applications work together using API’s. Similarly, For Uber, the renowned ride service company, they borrow PayPal’s Braintree API, a secure method of processing credit card payments.

 

In recent years we have seen the emergence of Web API’s. Most popular and widely used API’s are under the category of social networking, mapping, shopping, and Telephony.

These are the 4 main types of Web API’s:

Open API: It is also known as public API where there are no restrictions to access these types of API. Software solutions are created open source. It helps to get information and analytics about the audience, users and traffic. Google map is an example of an Open API.

Partner API: Specific rights are required to access this type of API as they are not available to the public.

Internal API: They are also called as private API and they are meant for use within the company. It is used by the internal team to improve the company’s product and service. (Apps for their own internal requirements)

Composite API: They combine different data and service API’s. It is a sequence of tasks that run synchronously. Its main use is to speed up the process of execution and to improve listeners performance in web interfaces.

We also have 2 popular web service API’s as well:

REST API: REST is the acronym for Representational State Transfer which is completely a web service. It is based on URI (Uniform resource identifier), HTTPS protocol and uses plain text, HTML, XML and JSON as data format which makes it optimized for web and makes compatible with browsers.

• REST API can facilitate client-server communication and architecture.

• It can simplify how applications interact with the API.

• It is lightweight and used primarily for web services.

• We can use PHP to set up a REST API with simple authentication.

• Data can be cacheable which means it can be reused by browser later without having to initiate another request back to the server thus saving time.

 

SOAP API: SOAP is the acronym for Simple Object Access protocol and it is a protocol which is little more complex than REST in terms of security and transactions. Mobile applications interfacing with bank and messaging apps that need reliable communication uses SOAP.

• It uses web service (WS)security in addition to SSL support.

• Data format uses the only XML.

• SOAP requires more resources and more bandwidth.

• SOAP becomes a recommended choice for enterprise type applications rather than web service applications.

 

Popular examples of the API include:

a) Google Maps API – It embeds Google Maps on web pages using a JavaScript. Google Maps API is designed to work on mobile devices and desktops.

b) Youtube API- It lets developers integrate Youtube videos and functionality into websites or applications. Youtube API’s include Youtube player API, Youtube live streaming API, etc.

c) Flickr API- It is used by developers to access Flickr photo sharing community data.

d) Twitter API- Twitter offers two API’s. REST API allows developers to access core Twitter data and Search API provides methods to interact with Twitter search and trends data.

It will be more interesting to share your valuable comments and posts that can help to gain more understanding of API for all. Feel free to stay connected to get more updates ……

Leave a Reply