- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Need way to get MAC's of clients CURRENTLY connected to network. (Seeing 4 hr old results currently)
Currently doing the call below, but getting results with MAC addresses of clients that have been disconnected from the network for hours. Is there another call, or better way to do this? Ideally would want to see only devices currently actively connected to the network, but realistically if it was a reasonable timeframe of error, like a few minutes, I would be fine with that.
wificlientsget = requests.get(
'https://api.meraki.com/api/v0/networks/networkID/clients',
headers={'x-cisco-meraki-api-key': apikey, 'Accept': 'application/json'}
)
Solved! Go to solution.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well that call is showing clients that have used the network in the specified time interval. But if you don't specify a timespan yourself it defaults to 1 day, so it's showing you the users that have used the network in the last day. Try specifying a timespan that suits you. It's a value in seconds.
In each of the results there's also a field called "status" that'll show "online" or "offline". So you could also use a large interval but filter out all the results that state "offline".
E.g.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well that call is showing clients that have used the network in the specified time interval. But if you don't specify a timespan yourself it defaults to 1 day, so it's showing you the users that have used the network in the last day. Try specifying a timespan that suits you. It's a value in seconds.
In each of the results there's also a field called "status" that'll show "online" or "offline". So you could also use a large interval but filter out all the results that state "offline".
E.g.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!!
Thats the route I was thinking I would need to take, but I was looking at the t0 param, and couldn't figure out how to format it. Didn't even notice the timespan one. Also didn't realize the status field existed 😆. Thanks for the help!!
Out of curiosity, what site is that documentation under from the SS you posted? Haven't seen that before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a screenshot from postman. Have a look here to set it up to make your Meraki API life easier:
https://developer.cisco.com/meraki/build/meraki-postman-collection-getting-started/
