Get Network Connection Stats returns null

boomi
Getting noticed

Get Network Connection Stats returns null

Trying to use https://developer.cisco.com/meraki/api/#/rest/api-endpoints/wireless-health/get-network-connection-s...

 

I've tried on two different network ID's, with a few combinations:

 - No query params

 - timespan=300

 - timespan=300 + ssid=0

 

It always just returns null unless I botch the params. Am I missing a requirement for using this call?

6 REPLIES 6
Edgar-VO
Building a reputation

Re: Get Network Connection Stats returns null

Good Morning,

 

I tried to use the connection status using Python, and the return result.

 

Here is a part of the code i used. Network_Id is of course the Network ID

 

---------------------------------------------------

 

param = {}
param['timespan'] = 360

reponse = dashboard.wireless_health.getNetworkConnectionStats(network_id,**param)

print(reponse)
 
---------------------------------------------------
 
And the response it gave me is ;
 
{
   'assoc': 1,
   'auth': 2,
   'dhcp': 0,
   'dns': 0,
   'success': 2
}
 
BrechtSchamp
Kind of a big deal

Re: Get Network Connection Stats returns null

 

 

 

print(dashboard.wireless_health.getNetworkConnectionStats(networkId="L_12345678987654321",timespan=432000))
print(dashboard.wireless_health.getNetworkConnectionStats(networkId="L_12345678987654321",timespan=432000, ssid=0))

 

 

 

 

This works too 😉 .

boomi
Getting noticed

Re: Get Network Connection Stats returns null

Thanks for helping me confirm!

 

The API apparently returns 'null' instead of zeros when there haven't been any connection attempts in the specified timespan.

 

Expected:

{
    "assoc": 0,
    "auth": 0,
    "dhcp": 0,
    "dns": 0,
    "success": 0
}

 

Actual:

null

 

BrechtSchamp
Kind of a big deal

Re: Get Network Connection Stats returns null

Ah yes, it does that.

 

I agree that the output you expected would've been nicer.

Edgar-VO
Building a reputation

Re: Get Network Connection Stats returns null

Hmmm,

 

I have to agree on that one.... None is no value at all (in programming)

i Guess there is always room for improvement 😉

 

DexterLaBora
Meraki Employee

Re: Get Network Connection Stats returns null

Good feedback on this endpoint. This one will need some love. Added to our ToDo list for v1. 

 

Cheers,

API Team

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.