Don't skip Rest-Api

Hi ,my name is Sundaram Dubey. I am Python developer and competitive programmer .
I am going to discuss about Rest-Api . A lot of you before heard about Rest Api but if don't know what is this so today we are going to discuss about it .
Now a days nearly 90% of start-ups works on the rest-Api(Application Program Interface) first .
Rest Api is essential in web development field . It is basically "Json data about data ". 
  1. Client — the client is the person or software who uses the API. It can be a developer, for example you, as a developer, can use Twitter API to read and write data from Twitter, create a new tweet and do more actions in a program that you write. Your program will call Twitter’s API. The client can also be a web browser. When you go to Twitter website, your browser is the client who calls Twitter API and uses the returned data to render information on the screen.
  2. Resource — a resource can be any object the API can provide information about. In Instagram’s API, for example, a resource can be a user, a photo, a hashtag. Each resource has a unique identifier. The identifier can be a name or a number.

Suppose if you are making a website which has a lot of data and references but What if  CLIENT is not able to use them then there is no use of data . So we make a "JSON " representation of our data which will be quite helpful (If you know how json looks like ;)  . If i will talk about a formal definition it will look like this  : 
A RESTful web application exposes information about itself in the form of information about its resources. It also enables the client to take actions on those resources, such as create new resources (i.e. create a new user) or change existing resources (i.e. edit a post).
 REST stands for REpresentational State Transfer.
It means when a RESTful API is called, the server will transfer to the client a representation of the state of the requested resource.

Now let's take an example -if  You are using a instagram api in your web application then it will retrieve the name of the user, age ,photo(profile photo, if it is specific) and other inforamtion . In most of the cases it is in JSON format But in case it can also be in XML and HTML . So Client makes a request on server and gets the result basically resource .

What the server does when you, the client, call one of its APIs depends on 2 things that you need to provide to the server:
1.An identifier for the resource you are interested in. This is the URL for the resource, also known as the endpoint. In fact, URL stands for Uniform Resource Locator.
2.The operation you want the server to perform on that resource, in the form of an HTTP method, or verb. The common HTTP methods are GET, POST, PUT, and DELETE . 

Using Rest-Api Ease a lot of thing So i hope this will be helpful for you to get started .
You can check out my website envorbital.herokuapp.com uses 5 different Api.

Thank you--



Comments

Popular posts from this blog

Amazon Web Services

Deploying ML model to flask with joblib

Hacker Rank all java and python problem solutions