cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
784
Views
0
Helpful
1
Replies

get list of clients (LAN and WiFi) for a specific site via intent api

olmomezger
Level 1
Level 1

Hi, 

I was wondering what would be the preferred way of getting a list of all clients (lan and wifi) for a site using the intent API. 

I can see the API call https://developer.cisco.com/docs/dna-center/#!get-client-detail that will provide details for a given client. However, it requires the MAC, which I need to know first. 

I also found that https://developer.cisco.com/docs/dna-center/#!get-membership will return a list of MAC for a given site. However, since the devnet sandboxes don't have connected clients, I'm unable to test. 

My question is: Is site/get-membership the correct way for getting the list of clients? if not, what would it be? 

 

thanks

1 Reply 1

Alexander Stevenson
Cisco Employee
Cisco Employee

Hello @olmomezger,

 

Another option may be the 'Get Client Enrichment Details' call, which takes the MAC address or the Network User ID:

https://developer.cisco.com/docs/dna-center/#!get-client-enrichment-details

I wasn't able to get it to run in the browser there, but I was able use the cURL request generated and get it to work against the DevNet sandbox:

alexstev_0-1667590175020.png

But there are no devices, so we cannot see much.

I haven't been able to find an actual example of what the response will look like, but this Ansible module, based on it, is telling:

https://docs.ansible.com/ansible/devel/collections/cisco/dnac/client_enrichment_details_info_module.html#ansible-collections-cisco-dnac-client-enrichment-details-info-module-return-dnac-response

I hope this helps!