-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to average endpoint times out #326
Comments
Hi Maurice, Thanks for reporting this. I can't replicate the timeout right now but this is common. The 408 timeout usually means the request is too complex or requesting too much data. In the case of this location it is only reporting PM10, so not too complex. One confusing point is you are requesting yearly averages starting and ending from January 25. This returns a "yearly" average for 2023 from 01-25 until 12-31 and a "yearly" average for 2024 from 01-01 until 01-25. This latter is not a yearly average and is adding extra work for the query which may be slowing it down. This is a shortcoming of this endpoint that it allows this. I would recommend trying something like: Which will appropriately get you the full average from 2023. We are working on a new endpoint that will hopefully be more clear for yearly averaging. @caparker do you have any other thoughts on this? |
Thanks for the quick response, Russ! |
@MauriceHeinze do the adjusted |
Hello,
We're facing issues using the average endpoint. The locations endpoint we use to get the closest station near by works fine, but as soon as we try to get the average values for the first location it fails.
Error in requests.get: 408 Client Error: Request Time-out for url: https://api.openaq.org/v2/averages?temporal=year&date_to=2024-01-25&date_from=2023-01-25&locations_id=3197&spatial=location
Thanks in advance for looking into it.
Best,
Maurice
The text was updated successfully, but these errors were encountered: