Leaving out error handling etc., the core elements to take a 'snapshot' of current status for all devices are in the code snippet below (I use aio in most of my scripts, and I've extracted this direct from one of those, but for this simple purpose you could rewrite without aio). The availabilities endpoint doesn't return as rich a response, but if you also get the network and device details for the organization, you can then look up things like network names, device models etc. async with meraki.aio.AsyncDashboardAPI(
api_key=API_KEY,
base_url='https://api.meraki.com/api/v1/',
print_console=False,
output_log=False,
suppress_logging=True,
wait_on_rate_limit=True,
maximum_retries=10
) as aiomeraki:
# get the list of networks and devices so that you can look up extra info relating to the status responses
networks = await aiomeraki.organizations.getOrganizationNetworks(ORG_ID, perPage=1000, total_pages="all")
devices = await aiomeraki.organizations.getOrganizationDevices(ORG_ID, perPage=1000, total_pages="all")
statuses = await aiomeraki.organizations.getOrganizationDevicesAvailabilities(ORG_ID, perPage=1000, total_pages="all")
... View more