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

Get Network Connection Stats returns null

Highlighted
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
Highlighted
Getting noticed

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
}
 
Highlighted
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 😉 .

Highlighted
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

 

Highlighted
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.

Highlighted
Getting noticed

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 😉

 

Highlighted
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.