What is REST API

Posted by Tushar Bedekar

Basic Description 

The Word REST stands for Representational State Transfer which is nothing but the technology that is generally preferred to more robust simple object access protocol (SOAP) Technology. Robust because it leverages less bandwidth usage and hence more suitable for internet usage.

An API ( Application Programming Interface ) for a website or an app is a code that allows two software programs to communicate with each other. It is the program that requests the hosted services.

An API is required when we want to consume the services that are running or hosted on the other web servers rather than installing the huge redundant hardware devices as per the demand that fulfills our purpose. This can be understood by the following examples:

As we are creating the weather app for the mobile device. Now the app needs to be dynamic, that is the weather needs to change as per the environment. That we need to have some sensors to collect the data for weather. Also, there can be one approach that we install sensors at different locations across the globe for collecting the data. This will be very costly if we go like this. The second approach can be contacting some vendor/service provider that can share the required weather information.

Now as our app is ready that means we have a ready design for use and we just need some data to make the response dynamic. We can get that data from the other hosted servers dedicated for this purpose using communication interfaces such as REST API`s.

Data Format 

Now the data we receive from other serves need to have some specific format that is structured so that it can be easily understood.In case of REST API, this data format can be JSON(JavaScript Object Notation) or XML(Extensible Markup Language).

Communication Using REST API 

In Our Example here we need weather information. That may contain data such as city name, humidity level, temperature etc. Now all this data can be contained within one object or specific to one object ( instance) here that object is "weather object" which is related to whether class. As we know that each and every object has some properties such as state, behavior etc. So if we need weather data we need to first set up a connection to the specific port of the server where a particular service is running and then we need to capture the state of the object weather which is nothing but the representational state. Now, this representational state is being transferred using some communication channel called an API.The state information can be transferred in JSON or XML format.



4 comments:

  1. In Our Example here we need weather information. That may contain data such as city name, humidity level, temperature etc. Now all this data can be contained within one object or specific to one object ( instance) here that object is "weather object" which is related to whether class. As we know that each and every object has some properties such as state, behavior etc. So if we need weather data we need to first set up a connection to the specific port of the server where a
    https://jant-mamlka.com/%D8%A7%D8%B1%D8%AE%D8%B5-%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%85%D9%86%D8%A7%D8%B2%D9%84-%D8%A8%D8%A7%D9%84%D8%AF%D9%85%D8%A7%D9%85/

    https://jant-mamlka.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%85%D9%88%D9%83%D9%8A%D8%AA-%D8%A8%D8%A7%D9%84%D8%AF%D9%85%D8%A7%D9%85/

    https://jant-mamlka.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%85%D8%AC%D8%A7%D9%84%D8%B3-%D8%A8%D8%A7%D9%84%D8%AF%D9%85%D8%A7%D9%85/
    https://jant-mamlka.com/%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D8%A8%D8%AE%D9%85%D9%8A%D8%B3-%D9%85%D8%B4%D9%8A%D8%B7-%D9%88%D8%A7%D8%A8%D9%87%D8%A7/

    https://beautiful-house1.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%83%D9%86%D8%A8-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

    https://beutiful-house1.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%A7%D9%84%D8%B5%D9%81%D8%B1%D8%A7%D8%AA-%D9%84%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D8%A7%D9%84%D8%AE%D8%B2%D8%A7%D9%86%D8%A7%D8%AA-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

    9

    https://jant-mamlka.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%85%D8%B3%D8%A7%D8%AC%D8%AF-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

    https://beautiful-house1.com/%D8%BA%D8%B3%D9%8A%D9%84-%D8%A7%D9%84%D8%B3%D8%AC%D8%A7%D8%AF-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

    https://beutiful-house1.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%A7%D9%84%D8%B5%D9%81%D8%B1%D8%A7%D8%AA-%D9%84%D8%B9%D8%B2%D9%84-%D8%A7%D9%84%D8%A7%D8%B3%D8%B7%D8%AD-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

    ReplyDelete

  2. Product Directory

    MoveBuddha is known as a different service that would like to make it easy to want to hire professional movers, obtain a storage location container, or do the very own move. If if you're working an online shop through eBay, or your personal site, you may want to utilize a household to conduct supply to the clients. An essential part of moving your house is hiring movers with who you are feeling comfy. Some movers charge by the hour, so just having them there to load things may not take too long at all. Have to move a solitary piece, an entire bedroom collection, or all the furniture in your home or workplace? Within our check the EZ Moves furnishings moving plan allowed that you slide home furniture very easily on floor covering, but this didn't function as well on hard wood floors.شركة عزل صوت بالرياض
    غرف نوم جديدة للبيع بالرياض


    I employed hard flooring sliders to relocate 3 bookcases about 65 foot each, and employed the rug sliders to approach a fold-out settee about the living bedroom till I identified just where I actually liked that best. Springfield Furniture Moving is very well known to get top quality products, reputable services, and remarkable deals. 4 times Corner movers (each 170mm x 170mm x 230mm). The movers will be trained to officer the belongings too as your house - just about all furniture pieces are shock absorbing and stretch wrapped free of cost of charge, ensuring the items and home happen to be damage-free at the end of your move.نقل اثاث بالرياض
    شركة نقل اغراض بالرياض
    شركة الرحمة افضل شركة نقل اثاث من الرياض الي دبي
    شركة نقل اثاث من الرياض الي الاردن
    تخزين اثاث بالرياض
    شركة نقل اثاث خارج المملكة
    شركة نقل اثاث خارج الرياض
    افضل شركة لشراء اثاث مستعمل بالرياض

    ReplyDelete

back to top