need to access multiple pages on the /networks/{networkId}/clients API dynamically

Solved
Farrukh
Getting noticed

need to access multiple pages on the /networks/{networkId}/clients API dynamically

need to access multiple pages on the /networks/{networkId}/clients API . 

 

Looking for a script that can pull all the clients in the network.

 

and  some networks have multiple pages.

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

You could also look at the example code at https://github.com/meraki/dashboard-api-python/tree/master/examples .  In particular aio_org_wide_clients_v1.py.

View solution in original post

2 Replies 2
sungod
Kind of a big deal

Why not use the SDK V1, still in beta, but it's pretty good, I've been using it for a few months

 

https://github.com/meraki/dashboard-api-python   ...currently:  https://pypi.org/project/meraki/1.0.0b13/

 

Cut/paste from one of my scripts...

 

            # get list of devices on network for the last 24 hours

            t = 24 * 60 * 60

            clients = await aiomeraki.networks.getNetworkClients(net['id'], timespan=t, perPage=1000, total_pages="all")

 

This will return all clients, the page handling is done for you.

 

PhilipDAth
Kind of a big deal
Kind of a big deal

You could also look at the example code at https://github.com/meraki/dashboard-api-python/tree/master/examples .  In particular aio_org_wide_clients_v1.py.

Get notified when there are additional replies to this discussion.