- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get AP status
Hi ,
Is there a efficient way to retrieve AP status ? ( online , offline , repeater )
I have not seen an API call for that and you can't see it from the dashboard - Overview - Devices page.
Only way I found is to dump all my AP MAC adresses and compare DHCP leases to find if the AP has a lease or not...
I have more than 1000++ AP so I can't go network by network to find that info.
Thanks !
Solved! Go to solution.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've got a report I run that checks for repeaters.
I turn the JSON into objects because I found it easier than manipulating raw JSON later on.
It iterates across dozens of orgs, hence my logic below.
If you want to see exactly how I did it, look here. It's a work in progress that needs reworking.
Order of operations:
- Get org list
- Get network list
- Grab device list per network
- Convert device list into a list of device objects, since I find it easier (createDeviceObj)
- Below in report generating chunk, for device in devicelist:
- check if lanIp is None: (line 572 in script above)
- If None, check if model is MR
- If MR, set report value as "Repeater AP?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply
As expected that doesn't work !
Status is either offline or online or alerting. I want to know if an AP is in repeater mode or not.
EDIT : I think my first message , wasn't that clear. My appologies
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not available at this time to my knowledge.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've got a report I run that checks for repeaters.
I turn the JSON into objects because I found it easier than manipulating raw JSON later on.
It iterates across dozens of orgs, hence my logic below.
If you want to see exactly how I did it, look here. It's a work in progress that needs reworking.
Order of operations:
- Get org list
- Get network list
- Grab device list per network
- Convert device list into a list of device objects, since I find it easier (createDeviceObj)
- Below in report generating chunk, for device in devicelist:
- check if lanIp is None: (line 572 in script above)
- If None, check if model is MR
- If MR, set report value as "Repeater AP?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a get all Devices in Org call that is the exact same info as the get list per network. Should save a ton of API calls.
https://developer.cisco.com/meraki/api/#/rest/api-endpoints/devices/get-organization-devices
GET /organizations/{organizationId}/devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@BrianP wrote:
Awesome. Any reason to do the 'Grab device list per network' step ?
There is a get all Devices in Org call that is the exact same info as the get list per network. Should save a ton of API calls.
https://developer.cisco.com/meraki/api/#/rest/api-endpoints/devices/get-organization-devices
GET /organizations/{organizationId}/devices
I wanted to check switches/APs set for DHCP against DHCP pools on the MX in their networks. Then if the MX was the DHCP server for that device, check the MX's pool for a reservation for that device's IP.
All of my clients have a single network for each physical location, for switches/AP/MX. So once I got inside the network, I could check all of that without having to do a rummage to figure out which MX to compare the switches and APs to.
That gave me logic that I could follow more easily. Crunching the returns and writing the spreadsheet slows the process down enough that I didn't hit the call speed limiter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Either way, you solved Raphael's issue!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@BrianP wrote:
Fair enough. For people who have issues hitting the Rate limit ( due to other active monitoring API calls ), it would be significantly faster to do the network list call and the full org device list call, and correlate the device to the correct network in the code, instead of the individual calls per network.
Either way, you solved Raphael's issue!
Definitely agree. 🙂 I can do things sloppily sometimes because Auvik and I are the only things making calls, and Auvik rate limits itself.
There are advantages and disadvantages to being the only automator on your team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice !
I didn't think it that way ! I will script that in python.
Thanks for the help !
