Hello and welcome to the Golang programming language course in the previous session, we talked about
API specification and protocols and indecision.
We want to talk about the other concept.
Rest API.
Representational state transfer or arrest is an architectural style that defines a set of constraints
to be used for creating video services.
The rest API is a way of accessing that services in a simple and flexible way without having any processing
risk.
Technology is generally preferred to the more robust simple logic access protocols to app technology
because risk uses less bandwidth.
Simple and flexible, making it more suitable for internet usage.
It's used to fetch or give some information from a vet service.
All communication down virus API uses on the edge to type in requests.
Rest follows Another logic seems it makes data available as resources.
Its resource is represented by a unique You are ill and one can request this resource by providing its
urine web API that comply with risk.
Architectural constraints are called restful APIs.
Building risk pool web services like either programming skills is part art, part science.
As the internet industry progresses, creating a rest API becomes more concrete with emerging best practices.
RESTful systems support and staging in different formats such as the plane takes esteemed examine in
JSON.
Windswept only allows estimate.
The ability to support multiple formats for storing and exchanging data is one of the reasons wrath
is a problem and choices for building public API.
These days, social media gains in travel companies provide external APIs to improve their brand visibility
even more.
Twitter has numerous restful APIs.
Expedia has both swipe and restful apps for its partners.
If you consider redefining your trauma and hospitality business offering, dive deep into the Board
of Travel and Booking APIs with our dedicated article.
JavaScript Object Notation, or JSON, is a lightweight and easy to parse text format for data exchange.
Its syntax is based on a subset of the standard ACMA Dash 200 and 62 tradition.
IT JSON file comes as collections of name and value pairs and all their lists of values.
Since these are universal data structures, the format can be used with any programming language.
HTP verse.
These are some conventions, should it be a painless follow.
These are actually not part of the specification.
What we need to understand these to fully utilize rest API is to debate defines a set of practice methods
to indicate the desired action to be performed for a given resource.
Also, they can also be nouns is recorded.
Methods are sometimes referred to as SDP webs.
Each of them implements a different semantic, but some common features are shared by a group of them,
e.g. a request method can be safe or catchable.
Yes.
The urge to Typekit method is used to read or retrieve a representation of a resource in the safe pass,
get returns every presentation and examine or Jason and respond response quote off 200 in an earlier
case.
It most often returns, for example, 400 back because all post the post verb is most often utilized
to create new resources.
In particular, it's used to create subordinate resources that is subordinate to some other e.g., apparent
resource unsuccessful creation.
Return to Typekit Status 201 returning a location header with a link to the newly created resource with
the 201 entity status.
Put it is used for updating the capabilities.
However, PWD can also be used to create a resource in the case that the resource ID is chosen by the
client instead of by the server.
In other words, if the Poot is to a urinal that contains the value of a as a resource idea and success
will all be returned 200th from input.
If using Poot for Create Return Status 201 Successful Creation Patch, it is used for modifying capabilities
that Patrick was only needs to contain the changes to the resource, not the complete resource.
This resembles poot, but the body contains its setup instructions, describing how a resource currently
residing on the server should be modified to produce a new version.
Delete.
It is used to delete a resource identified by a You Are.
An unsuccessful deletion return is typically a status 211 with a response Buddy Connect.
The Connect method establishes the channel of the server.
Identify the target resource head.
The head metals asks for a response identical to death of a Geth request, but without the response.
But trace the trace metal platforms and message loop back test along the path to the target resource
options.
The options method is used to describe the communication options for the target resource.
Terminologies the following are the most important terms related to rest API.
Resource.
Resource is an object or representation of something which has some associated data with it endure can
be set of methods to operate on it, e.g. animals, schools and employs resources and delete and update
are the operations to be performed on the resources collections.
Collections are set up Resources Egypt companies in the collection of company resource and you are or
uniform resource locator is a pass through which a resource can be located in.
Some actions can be performed on it in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.