300-435 Question 252
Select 3You are tasked with automating the retrieval of device details from a Cisco DNA Center instance using Inventory APIs. Which of the following requests and steps are required to successfully retrieve and display device data?
- A
Ensure you have a valid access token by authenticating with Cisco DNA Center's API
- B
Use the 'GET /dna/system/api/v1/auth/token' endpoint to directly retrieve device inventory data
- C
Send a GET request to the '/dna/intent/api/v1/network-device' endpoint to retrieve the device inventory
- D
Include the access token in the Authorization header with the format 'Bearer
' during the GET request - E
Directly access the '/dna/intent/api/v1/network-device' endpoint without any token for simplicity
Show answer and explanation
Correct answers: A, C, D
Explanation
To retrieve device inventory data from Cisco DNA Center using Inventory APIs, you must first authenticate and obtain a valid access token. Then, you send a GET request to the '/dna/intent/api/v1/network-device' endpoint with the access token included in the Authorization header. Skipping authentication or attempting to access the endpoint without a token will result in an error.
- A. Correct.
Correct: Authenticating and obtaining a valid access token is necessary to interact with Cisco DNA Center APIs.
- B. Incorrect.
Incorrect: The 'GET /dna/system/api/v1/auth/token' endpoint is used for authentication, not for retrieving device inventory data.
- C. Correct.
Correct: The '/dna/intent/api/v1/network-device' endpoint is specifically used to retrieve data about the network devices.
- D. Correct.
Correct: The access token must be included in the Authorization header in the format 'Bearer
' to authenticate the request. - E. Incorrect.
Incorrect: Cisco DNA Center APIs require authentication via a token, and direct access without a token will result in failure.