Cisco DNA Center Sites API: Retrieve Site Identifier for Adding Devices

Get Site Identifier for Adding Devices | Cisco DNA Center API

Question

The Cisco DNA Center Sites API must be used to add a device to a site, but only the site name is available.

Which API call must be used to retrieve the site identifier so that the device can be properly added to the network?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

https://community.cisco.com/t5/networking-blogs/welcome-to-the-dna-center-api-support-community/ba-p/3663632

The correct answer to the given question is option D. /dna/intent/api/v1/site/siteName.

When adding a device to a site in Cisco DNA Center, the site identifier is required to properly associate the device with the site. In this scenario, only the site name is available. So, the site identifier must be retrieved using the Cisco DNA Center Sites API.

The Cisco DNA Center Sites API provides a set of RESTful API calls to manage site-related operations, such as creating, retrieving, updating, and deleting sites. To retrieve the site identifier, the appropriate API call must be used.

Option A, /dna/intent/api/site/siteId, is not a valid API call. It lacks the version number, which is required for all Cisco DNA Center API calls.

Option B, /dna/intent/api/site, returns a list of all sites in the Cisco DNA Center. However, it does not provide the site identifier for a specific site.

Option C, /dna/intent/api/v1/site, is a valid API call that retrieves a list of all sites in the Cisco DNA Center. However, it does not provide the site identifier for a specific site.

Option D, /dna/intent/api/v1/site/siteName, is the correct API call that retrieves the site identifier for a site with a specific name. The API call requires the site name as input and returns the site identifier as output.

In conclusion, when only the site name is available and the site identifier is required to add a device to a site in Cisco DNA Center, the /dna/intent/api/v1/site/siteName API call must be used to retrieve the site identifier.