get list of clients (LAN and WiFi) for a specific site via intent api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 08:07 AM
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
- Labels:
-
Other Data Center Topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:40 PM
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:
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:
I hope this helps!
