What is web API?

Rajitha Sandaruwan
4 min readOct 25, 2020

Application Programming Interfaces (APIs) are constructs made available in programming languages to allow developers to create complex functionality more easily. They abstract more complex code away from you, providing some easier syntax to use in its place.

Web API is the enhanced form of the web application to provide services on different devices like laptop, mobile, and others. Today, all kind of businesses use the internet as a cost-effective way to expand their business in the international market. Web application helps to exchange information on the internet and also helps to perform a secure transaction on web sites and Web applications are popular as the web browser is available in default, we don’t need any installation of software on computers with operating systems.

Web API is an API as the name suggests, it can be accessed over the web using the HTTP protocol. It is a framework that helps you to create and develop HTTP based RESTFUL services. The web API can be developed by using different technologies such as java, ASP.NET, etc. Web API is used in either a web server or a web browser. Basically Web API is a web development concept. It is limited to Web Application’s client-side and also it does not include a web server or web browser details. If an application is to be used on a distributed system and to provide services on different devices like laptops, mobiles etc. then web API services are used. Web API is the enhanced form of the web application.

There are two types of web APIs

1. Client-side scripts:

· JavaScript, HTML, and other client-side scripting languages.

· Those are used to design the web forms to present information to users.

2. Server-side scripts:

· ASP and other server-side scripting languages.

· Those are used to perform business logic and database related operations like storing and retrieving information.

RESTful services

Web API is the enhanced form of a web application. SOAP (Simple Object Access Protocol) was an XML based protocol for developing the connected web applications. Web API may or may not be RESTful services, but they are always HTTP based services. REST stands for Representational State Transfer and in REST API, only the state of the object is sent to the server to find the desired result. REST is an architectural pattern for developing an API that uses HTTP as its underlying communication method.

RESTful Web Services are basically REST Architecture based Web Services. In REST Architecture everything is a resource. RESTful web services are light weight, highly scalable and maintainable and are very commonly used to create APIs for web-based applications.

Web API uses

These services can be accessed by different kind of users like:

· Web Browsers

· Mobile applications

· Desktop applications

· IOTs (Internet of Things)

Why we use web API?

· A Web API services are preferable over other services to use with a native application that does not support SOAP but require web services.

· For creating resource-oriented services, the web API services are the best to choose. By using HTTP or restful service, these services are established.

· If you want good performance and fast development of services, the web API services are very helpful.

· For developing light weighted and maintainable web services, web API services are really helpful to develop that service. It supports any text pattern like JSON, XML etc.

· The devices that have tight bandwidth or having a limitation in bandwidth, then the Web API services are the best for those devices.

Examples for web APIs

· Wikipedia API: The Wikipedia are majorly used example of a web application.

· Google Maps API: Google Maps APIs allows developers to use Google Maps on Webpages using a JavaScript or Flash interface.

· Facebook API: The Facebook suite of APIs enables you to use various parts of the Facebook ecosystem to benefit your app, for example by providing app login using Facebook login, accepting in-app payments, rolling out targetted ad campaigns, etc.

· Telegram API: The Telegram APIs allows you to embed content from Telegram channels on your website, in addition to providing support for bots.

· YouTube API: Google’s API lets developers integrate YouTube and functionality into websites or applications. YouTube APIs include the YouTube analytics API, YouTube Data API, YouTube live streaming API, YouTube Player APIs and others.

· Pinterest API: The Pinterest API provides tools to manage Pinterest boards and pins to include them in your website.

· Twilio API: The Twilio API, which provides a framework for building voice and video call functionality into your app, sending SMS/MMS from your apps, and more.

· Mastodon API : The Mastodon API enables you to manipulate features of the Mastodon social network programmatically.

· Flickr API: The Flickr use to a photo-sharing web application.

· Twitter APIs: Twitter offers two APIs, the REST API allows developers to access core Twitter data and the search API provides methods for developers to interact with twitter search and trends data.

Limitations of web APIs

·Web API not enabled for Microsoft Dynamics 365 for Outlook with Offline Access while user is offline.

· Cannot query date values.

· When calling actions with entity collection parameters as well as other parameters, a collection parameter must be passed as the last parameter in the body.

· Cannot create customer lookup attribute.

· Cannot retrieve unpublished metadata.

--

--