What is ReSTfull API ? What is API ? What is REST ?


so we are living in a world of internet
where Internet is everything and to access the internet we have desktop
tablet and mobile and our world is not inside
our mobile this world that means the internet works on a simple protocol
which is called hypertext Transfer Protocol or simply HTTP and think about
protocol just as the rules because rules are rules but in the beginning of the
internet internet was designed to share information between one computer to
another computer placed apart but because we are living in it 2017 and
this means we need machine to machine talking and what is that suppose you
have one machine and under machine both machines work on a different kind of
operating system different language different situations and they have to
share the data between these two and all these process happen without the
involvement of the humans but you know the actual civil of any machine is its
software so actually we need software’s to talk that’s cool
but why we need the machine to machine talking let me explain you actually I
only use the future and what IOT stand so are i already means the Internet of
Things in the future you have house or you have a car and you can access the
house you can open and close the door start stop Geezer or AC something
like that and also the car you can send the information about how much fuel is
that how much speed is that and not only that even a simple toaster can be
included in internet or thing can be accessed by using Internet that’s cool
but these are the browsers to talk to machine yeah
this means we the humans can talk to machine by using the browser and not
this kind of human and whenever you request any page fly a browser you will
get the data along with that HTML and CSS because HTML and CSS is
intended to design to have the page looks more readable for human but
machine needs machine readable data so what we have to do if you have to think
about that yeah here comes our API and what API is API is application
programming interface and you know interface means connecting any to and
that’s exactly what we want but what an API can do for us API allow to software
program to communicate with each other and that exactly our sole purpose okay
API can be local and web and program API but in this episode we are only talking
about the web api but what web api can do for us so suppose you have a website
all you have a mobile app and in mobile app you want to get the weather
information and the G map for your user but your device cannot have a sensor to
sense the weather information and even it has it can sense only the information
where the mobile is placed not the information of whole word but there are
some website which can give you the data or the weather information of any any
city in the world so here is the interesting point so
let’s see some example let’s go to Chrome and open http://openweathermap.org this website give you the information of weather of every big city
in this world so let’s talk about Mumbai so search for Mumbai and you will get
the Mumbai here and here is the information let’s search about London
and you will search for London London is here London US sky is clear everything
is good but how will I get this information on my mobile app so for that
here comes our api’s so you can see here is API tab and let’s get this API
current weather data and let’s search for London so new tab and you will get
the data like this so actually the same data we have received here is now in a
structured way here so this is actually the machine-readable data and this is
the human readable data and I think you got the point to think about API as a
waiter who can take the order from you go to kitchen and come back with the
order you have placed similarly Web API can get the request from a machine go
back to server and get back the data to the requested machine but what we have
to do to create an API actually we know that there are many developers in the
world having knowledge of various kinds of languages so we need a concept or a
structured way of creating an API so that everyone in this world that means
every developer can follow that way here comes our hero called rest
and okay I am not about this kind of rest so dear you have to go so bye-bye
okay so rest stands for representational state transfer and what its mean by that
it’s not a web service it’s a concept design or architecture what the
architecture mean architecture if you heard this word you will come up like
this picture but the actual word meaning of the architecture is the art of
practice of designing and constructing buildings I’m not talking about the
buildings but same is true with the rest also we are going to build our data in a
structure or a proper way okay so suppose you have a lots of data you have
to structure it think about this as the data base having many kind of tables
having many relationship and if a machine requests data from your server
then you will give the data in a JSON format JSON stands for Java Script
object notation and how its look like it’s looked like this
so the machine will get the data in this format as we have seen on the openweathermap.org and you can see the curly braces then query pages and all the
information in this pages object so every API has to follow this way that
means the rest way of creating the API okay so some of the rest basics are
whenever you are creating an API in restful way that means if you want to
read the data you have to send a get request similarly to write you have to
send the post request and put for edit and delete for delete you know that’s
good but all these information are transfer on single thing which is called
HTTP as I have told you and you know same thing is true for Internet that
means our website our browsers our API everything works on the same platform
called URL route or resource or HTTP or anything you can call it you don’t have
to create a new platform for the API is the same platform used by humans is used
by the machines so we have seen that rest is not a web
service but let’s see what is web service it’s a collection of open protocol and
standard used for exchanging data and this is actually we want that means a
machine running on any kind of operating system having any kind of languages we
have to transfer the data between two machines this means an API created in a
rest way is a web service because web service is designed to exchange the data
between two kind of machines and this is the conclusion of this episode which
says that to have communication between machines we need API web api our machine
readable form of your web page so some websites are also consuming their own
api and they need a standard which we call rest so if you liked this episode
please give it a thumbs up share with others so that everyone know what is
restful api don’t forget to subscribe like BitFumes on facebook twitter and
instagram bye bye

Leave a Reply

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