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

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
Building a reputation

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

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.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.