Page Visited: 85
Read Time:3 Minute, 18 Second

Hello, Guys I here with an article on API and its types.

API(Application Programming Interface) is a set of tools to build software. It is an interface that allows one application to talk to another application through simple codes. For those who understand what API is will surely be helped a lot with this, cause this makes easy for the development of apps. It saves a lot of time in development as it has a predefined set of codes inside the API. APIs are used when programming graphical user interface (GUI) components.

If we talk about working it simply gets the request from the user via some script and provides the data according to the request

Nowadays every good web app has API of its own, with which we can integrate our app to it using their API. There are various examples of which the best example is Facebook, it offers users the ability to sign in to many apps and Web sites using their Facebook ID—a feature that relies upon Facebook APIs to work.

When you book a ride with OLA cabs it connects to its API which has all the details of the drivers in your area, and then it connects you to the nearby driver. The drivers also receive your data the same way using API. When you again try to locate your driver is connected to google map API and gives you the current location of the driver in google map.

We are using API in almost all the websites, you see a share or like button on this page, it is also connected using the respective API’s. Which allows the user to share the post or like the page without leaving this page.

Some times API can go wrong

Of course, just because an API is available now, that doesn’t mean it always will be. Twitter, for instance, notoriously limited third-party applications’ use of its APIs just over a year ago—a move that had the practical effect of killing off alternative Twitter clients and driving users to Twitter’s own site and apps, where Twitter can “monetize” them by displaying ads … er, promoted tweets. Twitter insisted the move was necessary to deliver a “unified” Twitter experience.

There are some types of API web services

  • SOAP (Simple Object Access Protocol)
  • XML-RPC
  • JSON-RPC
  • REST (Representational state transfer)

SOAP: SOAP is a protocol that defines the communication method, and the structure of the messages. The data transfer format is XML. SOAP allows a proprietary XML format.

XML-RPC: It is also XML data format but older than SOAP, but it uses specific XML format for data transfer whereas SOAP allows a proprietary XML format.

JSON-RPC: JSON-RPC is same as XML-RPC but uses JSON format instead of XML.

REST: It not a protocol but architectural principles. This architecture differentiates REST from other APIs. Some of the characteristics required of a REST service include simplicity of interfaces, identification of resources within the request, and the ability to manipulate the resources via the interface. There are a number of other, more fundamental architectural requirements too. It is one of the easiest web services that are accessible, REST services tend to offer an easy-to-parse URL structure, consisting primarily of nouns that reflect the logical, hierarchical categories of the data on offer. The most commonly used data format is JSON or XML, you can use either by including “JSON” or “XML” in the URL path.

For example, you want to get the list of all Carlist from car.com
http://car.com/carlist

and further you want only Maruti cars provided you know the name of that category in API
http://car.com/carlist/maruti

and furthermore classified like you know the name of the model for eg alto your request will look like
http://car.com/carlist/maruti/alto

REST is a widely used API for any programming language.

About Post Author

Girish

Hello Guys I am a freelance website developer and digital marketer, I have over 4 years of experience. I create websites using PHP, WordPress, angular js, HTML, CSS, Jquery, Javascript. I also create an eCommerce website, using Magento, open cart, woo-commerce, Shopify, big commerce. The platform is selected according to client needs. I will also help you create your native mobile app which will work on both android and IOS which is created using PWA for your new website or existing website. I also have a digital marketing team, which fulfills all your needs related to creating or enhancing digital presence.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleppy
Sleppy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Also published on Medium.

0

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enable Notifications.    Ok No thanks