CCNA-200-301- aaa5GITTC-Unlocked

(Jester) #1

variables. APIs allow programs running on different computers to work cooperatively,
exchanging data to achieve some goal.


In an API software world, some applications create an API, with many other applications using
(consuming) the API. Software developers add APIs to their software so other application software
can make use of the first application’s features.


Several types of APIs exist, each with a different set of conventions to meet a different set of needs.
The CCNA blueprint mentions one type of API—Representational State Transfer (REST)—
because of its popularity as a type of API in networking automation applications.


REST APIs follow a set of foundational rules about what makes a REST API and what does not.
First, from a literal perspective, REST APIs include the six attributes defined a few decades back
by its creator, Roy Fielding.


 Client/server architecture
 Stateless operation
 Clear statement of cacheable/uncacheable
 Uniform interface
 Layered
 Code-on-demand

List and Dictionary Variables


While simple variables have many great uses, programs need variables with more complex data
structures. In programming, a data structure defines a related set of variables and values. For
instance, Python uses list variables so that one variable name is assigned a value that is a list of
values rather than a single value. You could imagine that a network automation program might
want to have lists, such as a list of devices being managed, a list of interfaces on a device, or list
of configuration settings on an interface.


Python supports a similar data structure called a dictionary. If you think of the contents of a
dictionary for the English language, that dictionary lists a series of paired items: a term and a

Free download pdf