0% found this document useful (0 votes)
8 views

135.1 REST API security

Uploaded by

usamaali4273
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

135.1 REST API security

Uploaded by

usamaali4273
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Networkforyou

Welcome
To
Network for you
REST API security

Email us: 1 of 4 WhatsApp Us : +918143809578


[email protected]
Networkforyou

REST API security:


what a REST API is? what is an API?
• API Stand for Application Programming Interfaces.
• An API is a way for computer program to communicate directly with another computer program or in
other words we can say it machine to machine communication.

We, as network engineers usually use the command-line interface (CLI) or a GUI to configure or monitor our
network devices.

• Parsing show and debug commands with scripts is difficult because these commands are for humans.
• To interact with applications or network devices, we can use an Application Programming Interface
(API).
• An API is a software interface which allows other applications to communicate with our application.

REST Stand for REpresentational State Transfer:

• Representational means we transfer the representation of a resource between a server and a


client.
• We use a data format for this representation, typically JSON or XML.
• State Transfer means that each operation with a REST API is self-contained.
• Each request carries (transfers) all information (state) to complete the operation.
• REST APIs typically use HTTP methods to retrieve or send information between applications.
• We use the same HTTP methods when we use a web browser to visit a website, but now we use
them to interact with an application.
• HTTP has multiple methods, but these four are the most common ones:

GET: A read-only method to retrieve a specified resource.

POST: Submits data to the specified resource to process. The POST method can also create new resources.

PUT: Updates the specified resource by replacing the existing data.

DELETE: Deletes the specified resource.

HTTP is popular so you can use REST APIs in almost any programming language.

A resource is a “thing” you can access and receive or change its representation.

On the web, this could be a document or image. With a REST API, it could be a row in a database.

We access a resource with a Uniform Resource Locator (URL). That’s right, the URLs we also use for websites.

Email us: 2 of 4 WhatsApp Us : +918143809578


[email protected]
Networkforyou

- REST have some Constraints as given below

- Client – Server architecture (The Client sends a request , the server sends a response)
- Uniform Interface: Provides simplicity.
- State less: no client context is stored one the server between requests.
- Cacheability: Responses must define themselves as either cacheable or non cacheable
- Layered system: any intermediary devices such as load balancers must be transparent to the
client and server.
- Code on demand : It is optional that is Servers can temporarily extend or customize the
functionality of a client by transferring executable code.
- NETCONF and RESETCONF are API specially designed to work with network devices.

Email us: 3 of 4 WhatsApp Us : +918143809578


[email protected]
Networkforyou

How we can protect our self by using REST API?

Use SSL (http ----→ use https)

Follow REST API rules ----→ like Stateless so we will not have any session open – Be Stateless

Use Authenticate and Authorize

Don’t include system detail in URL.

Email us: 4 of 4 WhatsApp Us : +918143809578


[email protected]

You might also like