DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

All Cisco Umbrella APIs use HTTP-basic authentication.
The key and secret values need to be Base64 encoded
and sent as part of a standard HTTP basic Authorization
header. API requests are sent over HTTPS. APIs require
the credentials to be sent in the Authorization header.
The credentials are the username and password,
separated by a colon (:), within a Base64-encoded string.
For example, the Authorization header would contain the
following string:


Click here to view code image


"Basic ZGV2YXNjOnN0cm9uZ3Bhc3N3b3Jk"

In this case, ZGV2YXNjOnN0cm9uZ3Bhc3N3b3Jk
is the Base64-encoded string devasc:strongpassword
(where devasc is the username, and strongpassword is
the password). Example 11-1 shows three lines of code
that do Base64 encoding to plug the value into the
Authorization header.


Example 11-1 Python Code to Generate Base64
Encoding


Click here to view code image


""" Generate Base64 encoding using the base64
library """
import base64
encoded =
base64.b64encode('devasc:strongpassword'.encode('UTF-
8')).decode('ASCII')
print(encoded)

The Management API


The Umbrella Management API enables direct
customers, service providers (SPs), managed service
providers (MSPs), and managed security service
providers (MSSPs) to manage organizations, networks,
network devices, users, and roaming computers and
integrate actions in their everyday workflows.

Free download pdf