Q:

what is a REST API

1) RESTful
2) API
An API is an interface through which one program or web site talks to another.
They are used to share data and services, and they come in many different
formats and types.

A RESTful API is one of the many possible ways that programs, servers, 
and web sites can share data and services. REST (Representational State Transfer
) describes the general rules for how the data and services are represented 
through the API so that other programs will be able to correctly request and 
receive the data and services that an API makes available
3
Let's break it into two components:

1) RESTful
2) API
An API is an interface through which one program or web site talks to another.
They are used to share data and services, and they come in many different
formats and types.

A RESTful API is one of the many possible ways that programs, servers, 
and web sites can share data and services. REST (Representational State Transfer
) describes the general rules for how the data and services are represented 
through the API so that other programs will be able to correctly request and 
receive the data and services that an API makes available
4
1) REQUEST
2) RESPONSE
When we send request, we need to know the API
methods/endpoints that are available:
		- read documentation about API methods.
		- Swagger tool, that has API methods and descriptions
simple endpoint:
		…school.com/api/students
Types of Requests:
	GET -> Read data
	POST -> Create/insert data
	PUT -> Update data
	DELETE-> Delete data
I send GET, POST, PUT, DELETE type of API requests to
API endpoint/method and get response.
ORDS (oracle data service) API -> HR Database
ORDS API has methods that we can send request to, and it sends
response with Data from HR database.
1
Representational state transfer is a software architectural style that defines
a set of constraints to be used for creating Web services.

Web services that conform to the REST architectural style, called RESTful Web
services, provide interoperability between computer systems on the internet
15
An endpoint is one end of a communication channel. 
it would be represented as the URL of a server or service.
In REST APIs, the resource typically refers to some object or set of objects 
that are exposed at an API endpoint. 
An endpoint by itself is just 
a reference to a URL that accepts web requests that may or may not be RESTful.
0
<devices size="3">
    <device id="1"> 
        <link rel="self" href="/devices/1"/>
        <name>apple-srx_201</name> 
        <serialNumber>1111</serialNumber> 
        <connectionStatus>up</connectionStatus> 
    </device> 
    <device id="2"> 
        <link rel="self" href="/devices/2"/>
        <name>apple-srx_202</name> 
        <serialNumber>2222</serialNumber> 
        <connectionStatus>down</connectionStatus> 
    </device> 
    <device id="3"> 
        <link rel="self" href="/devices/3"/>
        <name>apple-srx_203</name> 
        <serialNumber>3333</serialNumber> 
        <connectionStatus>up</connectionStatus> 
    </device> 
</devices> 
-1
<device id="1"> 
    <link rel="self" href="/devices/1"/>
    <deviceFamily>apple-es</deviceFamily> 
    <OSVersion>10.3R2.11</OSVersion> 
    <platform>SRX100B</platform> 
    <serialNumber>32423457</serialNumber> 
    <connectionStatus>up</connectionStatus> 
    <ipAddr>192.168.21.9</ipAddr> 
    <name>apple-srx_200</name> 
    <status>active</status>
</device> 
-1

New to Communities?

Join the community