300-435 Question 210
Single answerYou are tasked with automating the provisioning of new devices on a network using Cisco DNA Center APIs. You need to retrieve a list of all the devices currently managed by Cisco DNA Center. Which API endpoint should you use, and what is the correct HTTP method for this operation?
- A
/dna/intent/api/v1/network-device (GET)
- B
/dna/intent/api/v1/network-device (POST)
- C
/dna/intent/api/v1/site (GET)
- D
/dna/intent/api/v1/network-device/poller (GET)
Show answer and explanation
Correct answer: A
Explanation
To retrieve a list of all devices managed by Cisco DNA Center, you use the '/dna/intent/api/v1/network-device' endpoint with the 'GET' HTTP method. This combination allows you to fetch information about the devices, such as their management status, configuration details, and operational state. Understanding the correct endpoint and method is critical for automating network tasks using Cisco DNA Center APIs.
- A. Correct.
This is the correct endpoint and HTTP method to retrieve a list of all devices managed by Cisco DNA Center. The 'GET' method is used to fetch data.
- B. Incorrect.
The 'POST' method is used for creating or modifying resources, not for retrieving data. This makes this option incorrect.
- C. Incorrect.
This endpoint is used for site-related information, not for retrieving network devices. Hence, this is incorrect.
- D. Incorrect.
This endpoint is specific to polling tasks related to network devices, not for retrieving the list of devices. Therefore, it is incorrect.