cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ask for the total number of clients in a network

SOLVED
Highlighted
Getting noticed

Ask for the total number of clients in a network

Hello, all.

 

When I want to know the total number of clients in a network, I make a loop code to count all objects in a client list.

 

And I have a question ― Isn't there an API to let users know the total number of clients connected to a network?

In a network category, it will be nice to be added.

 

Or does there already exist but I couldn't find it?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Getting noticed

Re: Ask for the total number of clients in a network

If you have a list of clients why not use len() instead of counting? i.e. (cut & pasted from a script)...

 

clients = await aiomeraki.networks.getNetworkClients(net_id, timespan=t, perPage=1000, total_pages="all")

 

...then...     len(clients)    ...will give you the number of clients seen in that timespan.

 

 

 

 

 

View solution in original post

3 REPLIES 3
Highlighted
Getting noticed

Re: Ask for the total number of clients in a network

If you have a list of clients why not use len() instead of counting? i.e. (cut & pasted from a script)...

 

clients = await aiomeraki.networks.getNetworkClients(net_id, timespan=t, perPage=1000, total_pages="all")

 

...then...     len(clients)    ...will give you the number of clients seen in that timespan.

 

 

 

 

 

View solution in original post

Highlighted
Getting noticed

Re: Ask for the total number of clients in a network

I already know this solution, but if the network has more than 1000 clients, it is complicated to get the clients from 1001th.

So I want to get the response about the total number of clients in a network. 😎

 

Thank you for kind reply!

Highlighted
Getting noticed

Re: Ask for the total number of clients in a network

Perhaps you are not aware, but the call I use in the example will return thousands of clients in one go, all the page handling occurs internally.

 

You could use the 'make a wish' button and ask for a new API call to return summary client data, perhaps you will be lucky.

 

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.