cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

Find site / location for AP using DNA API

koldfield
Level 1
Level 1

How do I use the Cisco DNA Centre API to find the site / location for a specific AP?

I have tried the following API end points, but they don't return the AP site / location:

  • /dna/intent/api/v1/network-device?hostname=...
  • /dna/intent/api/v1/wireless/accesspoint-configuration/summary?key={mac}
  • /api/v1/network-device/wireless/accesspoint/detail/?id={id from network-device above}

If I know the location I can get a list of APs in it using /dna/intent/api/v1/site?name=.*location-name.*

Using my browser developer tools to snoop on the DNAC GUI I can see that it uses /dna/intent/api/v1/graphql to retrieve the site / location. Whenever I try to use graphql from my script it always returns no results - {'response': []}. This may be because I don't know what to use for the X-CSRF-TOKEN cookie.

Who Me Too'd this topic