medium
Single Answer
0

You are writing a script to pull information from the Cisco DNA Center via the REST-based API. How do you authenticate so you can communicate with the Cisco DNA Center API?

Answer Options

A

Pass the username and password in every request.

B

Send a POST to the API for an authentication token.

C

Send a GET to the API for an authentication token.

D

Create a public private key pair for the Cisco DNA Center appliance.

Correct Answer: B

Explanation

You will authenticate with Cisco DNA Center by sending a POST request to the API for an authentication token. You can then use the authentication token for all subsequent requests to Cisco DNA Center. You will not pass the username and password; the username and password must be encoded in Base64 to obtain the authentication token. The dna/system/api/v1/auth/token API requires a POST request to obtain the authentication token, not a GET request. The Cisco DNA Center does not use public-private key pairs for API authentication.

cisco-dna-center
rest-api
authentication