Client Count History - working?

RouterGuy
Here to help

Client Count History - working?

I'm trying to get client count data off a few APs via

 

https://documenter.getpostman.com/view/897512/SzYXYfmJ#968195f1-9664-4eb1-b384-935e0c6533d1 

 

Seems like I am getting nothing but null client counts no matter how I prep the query.  I updated my network to the latest MR27.x code (prior to which the API returned a warning about needing to update).  

Does this call work?  If so what does null mean/indicate? 

Thanks 

 

 

 

https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/clientCountHistory?deviceSerial=Q2PD-5CJ8-AAQL&timespan=3600

[
    {
        "startTs": "2020-12-22T00:00:00Z",
        "endTs": "2020-12-23T00:00:00Z",
        "clientCount": null
    }
]


https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/clientCountHistory

[
    {
        "startTs": "2020-12-16T00:00:00Z",
        "endTs": "2020-12-17T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-17T00:00:00Z",
        "endTs": "2020-12-18T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-18T00:00:00Z",
        "endTs": "2020-12-19T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-19T00:00:00Z",
        "endTs": "2020-12-20T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-20T00:00:00Z",
        "endTs": "2020-12-21T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-21T00:00:00Z",
        "endTs": "2020-12-22T00:00:00Z",
        "clientCount": null
    },
    {
        "startTs": "2020-12-22T00:00:00Z",
        "endTs": "2020-12-23T00:00:00Z",
        "clientCount": null
    }
]

 

 

 

6 REPLIES 6
Bruce
Kind of a big deal

Re: Client Count History - working?

@RouterGuy I just tried the same call against a network and got the results I expected, the clientCount parameter in the returned JSON had the expected number of clients in it. I also tried it against a network that I know has no APs in it, and so no clients on wireless and go the null response. Maybe double check your network ID as a starting point.

RouterGuy
Here to help

Re: Client Count History - working?

Thanks for replying.  Any chance you could share the GET string so I could see if it's a syntax issue?  I've had a couple other episodes with the API documentation where things took some massaging beyond the documented format in order to get it to work...

 

Thanks again

RouterGuy
Here to help

Re: Client Count History - working?

After spending an inordinate amount of time troubleshooting in Postman, the only way I am able to get these calls to succeed is by including both timespan and autoResolution.  The rest of the parameters seem to be optional, but without these two the returned data is always incomplete.

 

BTW the same holds true for dataRateHistory.  

 

https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/dataRateHistory?timespan=3600&autoResolution=true&deviceSerial=Q2PD-VYZ9-SGKM

[
    {
        "startTs": "2020-12-23T18:00:00Z",
        "endTs": "2020-12-23T18:05:00Z",
        "averageKbps": 71670,
        "downloadKbps": 169932,
        "uploadKbps": 43779
    },
    {
        "startTs": "2020-12-23T18:05:00Z",
        "endTs": "2020-12-23T18:10:00Z",
        "averageKbps": 69428,
        "downloadKbps": 246332,
        "uploadKbps": 36540
    },
    etc, etc
]


https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/dataRateHistory?timespan=3600&deviceSerial=Q2PD-VYZ9-SGKM

[]

https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/dataRateHistory?ssid=0

[
    {
        "startTs": "2020-12-16T00:00:00Z",
        "endTs": "2020-12-17T00:00:00Z",
        "averageKbps": null,
        "downloadKbps": null,
        "uploadKbps": null
    },
    {
        "startTs": "2020-12-17T00:00:00Z",
        "endTs": "2020-12-18T00:00:00Z",
        "averageKbps": null,
        "downloadKbps": null,
        "uploadKbps": null
    },
    etc, etc
]

https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/dataRateHistory?autoResolution=true

[
    {
        "startTs": "2020-12-16T19:00:00Z",
        "endTs": "2020-12-16T20:00:00Z",
        "averageKbps": null,
        "downloadKbps": null,
        "uploadKbps": null
    },
    {
        "startTs": "2020-12-16T20:00:00Z",
        "endTs": "2020-12-16T21:00:00Z",
        "averageKbps": null,
        "downloadKbps": null,
        "uploadKbps": null
    },
    etc, etc
]

 

 

Bruce
Kind of a big deal

Re: Client Count History - working?

@RouterGuy I just used the API without a query string.

https://api.meraki.com/api/v1/networks/L_602356450160806666/wireless/clientCountHistory

And got the following results.

[
    {
        "startTs": "2020-12-16T00:00:00Z",
        "endTs": "2020-12-17T00:00:00Z",
        "clientCount": 23
    },
    {
        "startTs": "2020-12-17T00:00:00Z",
        "endTs": "2020-12-18T00:00:00Z",
        "clientCount": 22
    },
    {
        "startTs": "2020-12-18T00:00:00Z",
        "endTs": "2020-12-19T00:00:00Z",
        "clientCount": 24
    },
    {
        "startTs": "2020-12-19T00:00:00Z",
        "endTs": "2020-12-20T00:00:00Z",
        "clientCount": 24
    },
    {
        "startTs": "2020-12-20T00:00:00Z",
        "endTs": "2020-12-21T00:00:00Z",
        "clientCount": 23
    },
    {
        "startTs": "2020-12-21T00:00:00Z",
        "endTs": "2020-12-22T00:00:00Z",
        "clientCount": 24
    },
    {
        "startTs": "2020-12-22T00:00:00Z",
        "endTs": "2020-12-23T00:00:00Z",
        "clientCount": 22
    }
]
decaalv
Conversationalist

Re: Client Count History - working?

What do you get if you send this:

 

https://api.meraki.com/api/v1/networks/N_647955396387955998/wireless/dataRateHistory?timespan=3600&autoResolution=true

 

Will it get you the data for all Devices or will it aggregate up to the network level?

 

David Castillo

decaalv@gmail.com

klausengelmann
Here to help

Re: Client Count History - working?

Hello RouterGuy.

 

One question: did you manage to find how to use "timespan" and "autoResolution" correctly ?


My problem is: when I am polling an API for "client count" during a specific timeframe or period there are values that are not consistent. 

This situation is repeating even in larger intervals (I am polling after one hour).

I am trying to find a documentation for how periodically you can poll Meraki APIs (I am aware of the rate limit).

Regards,

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.