Please enable JavaScript.
Coggle requires JavaScript to display documents.
Network AUTOMATION M14, ., image - Coggle Diagram
Network AUTOMATION M14
REST
REST is an architectural style for designing web service applications. It refers to a style of web architecture that has many underlying characteristics and governs the behavior of clients and servers. Simply stated, a REST API is an API that works on top of the HTTP protocol.
Client-Server - The client handles the front end and the server handles the back end. Either can be replaced independently of the other.
Stateless - No client data is stored on the server between requests. The session state is stored on the client.
Cacheable - Clients can cache responses to improve performance.
RESTful APIs use common HTTP methods including POST, GET, PUT, PATCH and DELETE. As shown in the following table, these correspond to RESTful operations: Create, Read, Update, and Delete (or CRUD).
URI, URN, and URL
Protocol/scheme - HTTPS or other protocols such as FTP, SFTP, mailto, and NNTP
Hostname - www.example.com
Path and file name - /author/book.html
Fragment - #page155
Anatomy of a RESTful Request
In a RESTful Web service, a request made to a resource's URI will elicit a response. The response will be a payload typically formatted in JSON, but could be HTML, XML, or some other format. The figure shows the URI for the MapQuest directions API. The API request is for directions from San Jose, California to Monterey, California.
ESTful API Applications
Developers
often maintain web sites that include information about the API, parameter information, and usage examples. These sites may also allow the user to perform the API request within the developer web page by entering in the parameters and other information.
Postman
Postman is an excellent tool for learning how to construct API requests, and for analyzing the data that is returned from an API. The following figure shows an example of using the MapQuest API with Postman.
Automation Overview
The Increase in Automation
Automation is any process that is self-driven, that reduces and potentially eliminates, the need for human intervention
Machines can work 24 hours a day without breaks, which results in greater output.
Machines provide a more uniform product.
Automation allows the collection of vast amounts of data that can be quickly analyzed to provide information which can help guide an event or process.
Robots are used in dangerous conditions such as mining, firefighting, and cleaning up industrial accidents. This reduces the risk to humans.
Under certain circumstances, smart devices can alter their behavior to reduce energy usage, make a medical diagnosis, and improve automobile driving safety.
Thinking Devices
Many devices now incorporate smart technology to help to govern their behavior. This can be as simple as a smart appliance lowering its power consumption during periods of peak demand or as complex as a self-driving car.
Configuration Management Tools
Ansible
Chef
Puppet
SaltStack
Data Formats
The Data Formats Concept
These are some common data formats that are used in many applications including network automation and programmability:
JavaScript Object Notation (JSON)
eXtensible Markup Language (XML)
YAML Ain’t Markup Language (YAML)
Data Format Rules
Data formats have rules and structure similar to what we have with programming and written languages. Each data format will have specific characteristics:
Syntax, which includes the types of brackets used, such as [ ], ( ), { }, the use of white space, or indentation, quotes, commas, and more.
How objects are represented, such as characters, strings, lists, and arrays.
How key/value pairs are represented. The key is usually on the left side and it identifies or describes the data. The value on the right is the data itself and can be a character, string, number, list or another type of data.
Compare Data Formats
JSON, YAML, XML
Cisco Digital Network Architecture (DNA)
APIs
The API Concept
An API is software that allows other applications to access its data or services. It is a set of rules describing how one application can interact with another, and the instructions to allow the interaction to occur. The user sends an API request to a server asking for specific information and receives an API response in return from the server along with the requested information.
An API Example
.