200-901 · Question #237
Refer to the exhibit. A network engineer must manage the network devices. The engineer prepares a Python scripts to authenticate to the Cisco to DNA Center API and request a device list. The device…
The correct answer is C. Send the Authentication header In the request with a valid configuration. Cisco DNA Center's REST API uses a two-step authentication flow: first, POST credentials to /dna/system/api/v1/auth/token to obtain an X-Auth-Token, then include that token as a header (X-Auth-Token: <token>) in all subsequent requests. A 401 on the device list endpoint means…
Question
Refer to the exhibit. A network engineer must manage the network devices. The engineer prepares a Python scripts to authenticate to the Cisco to DNA Center API and request a device list. The device request fails and returns errors code 401. Which action solves the problem?
Exhibit
Options
- AUpdate the API URL. which matched the API endpoint for device list.
- BSend the request to another network in case there are reachability Issues.
- CSend the Authentication header In the request with a valid configuration.
- DUpdate the credentials that are already supplied and retry the request
How the community answered
(24 responses)- B4% (1)
- C92% (22)
- D4% (1)
Explanation
Cisco DNA Center's REST API uses a two-step authentication flow: first, POST credentials to /dna/system/api/v1/auth/token to obtain an X-Auth-Token, then include that token as a header (X-Auth-Token: <token>) in all subsequent requests. A 401 on the device list endpoint means the script obtained the token but failed to include it in the device list request. Option C correctly identifies that the Authentication header must be sent with the request. Option A is wrong because the URL would return a 404, not 401. Option B (reachability) would cause a connection error, not 401. Option D would only help if credentials were invalid, which would fail at the token step, not the device list step.
Topics
Community Discussion
No community discussion yet for this question.
