API Error

csullmeraki
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
csullmeraki
Here to help

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

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)

 

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

rhbirkelund
Kind of a big deal

 

You can also see the Python definition for getNetworkLatencyStats here.

LinkedIn ::: https://blog.rhbirkelund.dk/

Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution 🙂

All code examples are provided as is. Responsibility for Code execution lies solely your own.
Edgar-VO
Building a reputation

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
 
Get notified when there are additional replies to this discussion.
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.