API call for device status by network

New here

API call for device status by network


We have a large implementation of 7500 access points (devices) across 125 locations (networks)

I previously used the API to call the status of all of our access points and populate a dashboard in our call center. This allowed us to immediately see if an access point went down or if the entire network was offline. The API limits are now limiting us so I need to figure out how to keep the call within 1000 rows.


The device status summary would be perfect if I could break this apart by network - does anybody know if that's possible OR if there's a better way to report on the status of offline/alerting access points?



7 Replies 7
Getting noticed

Yes, that is done by our NOC but I'm using the API to create a dashboard for our call center. I can't send alerts for 7500 devices to the entire team.

Meraki Employee
Meraki Employee

You can filter by network Ids in that call https://api.meraki.com/api/v1/organizations/xxxxx/devices/statuses/overview?networkIds[]=N_xxxx

Ryan / Meraki Solutions Engineer

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Meraki Employee
Meraki Employee

I believe this is the new endpoint you can leverage https://community.meraki.com/t5/Developers-APIs/Now-GA-Device-Availability-Change-History/m-p/201052


This endpoint returns the time-stamped availability change events that occurred for the organization's devices in the requested timespan, and is intended to be a hyper-efficient means of monitoring device availabilities. You can get started by calling:



GET /organizations/:organizationId/devices/availabilities/changeHistory



An empty result means there were no availability changes for any device in that organization for that timespan.


Default timespan is 1 day; maximum timespan is 14 days. Aside from the standard t0/t1/timespan controls, other filters include:





Head in the Cloud

The org-wide call mentioned by @David_Jirku is probably the lightest touch, but you do need to track device state separately as only state changes are returned.


The device status call is simpler as it's stateless, but you get more data back, though if you use it like the snippet below, it'll return info only on wireless devices that are offline/alerting/dormant...


statuses = await aiomeraki.organizations.getOrganizationDevicesStatuses(ORG_ID, statuses = ["offline", "alerting", "dormant"], productTypes = ["wireless"], perPage=1000, total_pages="all")



I think this is the right approach for what I'm trying to accomplish but I'm still not getting the right results. It seems to only see a fraction of what I know is true. I'm seeing 2 alerting APs but I know there's more. Offline is empty but I'm looking at offline access points in the console.


Is it possible that it's only looking through the first 1000 access points to see which ones are offline/alerting?

Head in the Cloud

I've always assumed the pagination is on returned results, not pre-filtered data, but if your code correctly handles pagination that wouldn't matter anyway.


Not specific to this call, there can be differences between API-Dashboard, reason vary, it can be a bug.


If you know that specific devices are offline and not being correctly reported, I suggest open a support case with the details,, if it's a bug it needs fixing, if there's some other reason, it would be good to know.


I'd try running the call without any filters, then see how the totals for each status compare to what you see in Dashboard, just in case it's a filtering-related issue.

Get notified when there are additional replies to this discussion.