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

API Error

Highlighted
Here to help

API Error

Hey all,

 

I am receiving this error:

 

meraki.exceptions.APIError: Wireless health, getNetworkLatencyStats - 400 Bad Request, {'errors': ['please specify either timespan or both t0 and t1']}

 

For this part of my code:

 

response4 = dashboard.wireless_health.getNetworkLatencyStats("L_637822297226351454")
print(response4)

 

Thanks!

 

5 REPLIES 5
Here to help

Re: API Error

Also, when I try to pass in a value for t[0] or t[1], I get :

TypeError: getNetworkLatencyStats() takes 2 positional arguments but 3 were given
Highlighted
Getting noticed

Re: API Error

The first post won't work, at minimum you need the timespan.

 

You aren't posting much of the code, which package are you using?

 

I'm guessing, but as a test, try...

 

response4 = dashboard.wireless_health.getNetworkLatencyStats("L_637822297226351454", timespan=86400)
print(response4)

 

Highlighted
Here to help

Re: API Error

This worked! I did not have the "timespan" parameter entered. Lol. Thanks!

Highlighted
A model citizen

Re: API Error

 

You can also see the Python definition for getNetworkLatencyStats here.

Highlighted
Getting noticed

Re: API Error

Hi there,

 

This usually works for me.... 

 

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

resp = dashboard.wireless_health.getNetworkLatencyStats("L_637822297226351454", **param)
 
With the use of theis param , you can enter more variables like ssid, vlan or other stuff
param['ssid'] = "My SSID"
param['vlan'] = 710
 
Best regards
Ed
 
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.