Help understanding API variables

AutomationDude
Building a reputation

Help understanding API variables

Hey guys,

 

I am trying to write code where if a client comes on more than X number of times on the network, we put them on a certain group policy.

 

https://developer.cisco.com/meraki/api-v1/#!get-network-clients-overview

 

I found this api endpoint but was looking for some help to understand what "usages" and "counts" signify. 

 

Thank you!

4 Replies 4
RaphaelL
Kind of a big deal
Kind of a big deal

Hi ,

 

I just ran that endpoint on my personnal network which contains 1 device. 

 

Here are the results : 

 

{"counts":{"total":1,"withHeavyUsage":0},"usages":{"average":2180905,"withHeavyUsageAverage":0}}

 I belive the total":1 is the number of clients in that network and the usages are simply the network usage :

RaphaelL_0-1658793842243.png

 

AutomationDude
Building a reputation

Thank you @RaphaelL. Looks like that won't work for this use case then.

 

https://developer.cisco.com/meraki/api-v1/#!get-network-client-traffic-history

 

Any idea what numFlows and Active seconds is here and if that could be used to determine how active a user has been overtime on a network?

Afaik flows are as defined here  https://en.wikipedia.org/wiki/NetFlow  so numFlows is how many flows. You must have traffic analysis enabled for this, and of course you need to specify the client of interest.

 

The API documentation doesn't say what period the client flow data covers, I'd guess the last rolling month, should be clear if you look at the result data.

 

For network-wide client info, I prefer https://developer.cisco.com/meraki/api-v1/#!get-network-clients which gets you details including data sent/received for every client on the network within the timespan.

 

You could start with that, then select the high usage clients (based on sent/received figures) for further analysis down to flows.

AutomationDude
Building a reputation

Thank you very much. The thing is that certain high usage clients are meant to be permitted so just trying to explore as many variables as I can in order to define the restriction most precisely

Get notified when there are additional replies to this discussion.