WEB API

Chamod Malintha
3 min readOct 25, 2020

API stands for an application programming interface. As the name suggests, Web API is an application programming interface for either web server or web browser which can be accessed over the web using the HTTP protocol.

https://www.google.com/search?q=web+api&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjVl4Lv5s_sAhUL8XMBHWNCAA8Q_AUoAXoECCAQAw#imgrc=MhmyigW8UWDVTM

There are two types of web APIs:

  • client-side web APIs
  • server-side web APIs.

server-side web API is normally HTTP based web server. Client-side web API is a programmatic interface that provides functionalities for clients. The intention of developing both types of web API is to act as the communication medium of the client and the server. Most of the systems use web APIs to provide some resources like datasets for interested parties. Some of the countries collect lots of data and make them publicly available via web APIs for any convenient manner. Rest API IS THE most popular type of web API. It is a standardized architecture style for creating a web service API. Various technologies can be used to develop web APIs like Java, ASP.NET, etc.

Why Use Web APIs?

· Best for resource-oriented services.

· better performance and fast development of services.

· Support for many text patterns (JSON, XML, etc.)

· Good for devices that have tight bandwidth.

Web APIs ease the development of a developer by providing inbuilt functions, classes, tools, etc. so developers do not need to develop everything from the very basic level, they can use endpoints to access publicly available resources. Endpoints are used to interact with web APIs and are usually accessed by URIs.

https://www.google.com/search?q=web+api&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjVl4Lv5s_sAhUL8XMBHWNCAA8Q_AUoAXoECCAQAw#imgrc=6VSexsdRJkqXiM&imgdii=4tNBfpP6FycmcM

Work of a web API can be described as following: client devices like laptops, mobile phones make requests to the web API and when the API receives the requests it sends those requests to the server to process the requests. After the processing is complete, it returns the results to the client.

Examples for Web APIs:

  • Google Maps API: allows developers to use google maps on their web pages.
  • YouTube API: allows developers to integrate with youtube. There are multiple APIs provided by youtube such as YouTube Analytics API, YouTube Data API, YouTube live streaming API, YouTube Player APIs, etc.
  • Web Audio API: allows users to use the audio contents on the web.
  • Web Speech API: can be used to add speech recognition to a web app.
https://idratherbewriting.com/learnapidoc/docapis_intro_to_rest_api_doc.html

Nowadays web APIs have become more popular with the advancement of internet services. Over the past 10–15 years, the number of available web APIs has grown significantly. Most companies and organizations are heavily relying on web APIs to serve their business clients. The best example is, in the year 2014, more than 5 billion requests were made to Netflix.

Limitations of Web APIs

· Security exposure: Adding an API adds vulnerability to your website.

· Not suitable for continuous services.

· Whenever a new Database operation is introduced, the API should be expanded.

--

--

Chamod Malintha

Software Engineer | BSc. (Hons.) in Software Engineering | University of Kelaniya, Sri Lanka