Skip to content
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

API not responding within 20 minutes to seemingly simple request #3

Open
davidherbert2 opened this issue May 24, 2019 · 3 comments
Open

Comments

@davidherbert2
Copy link

I've sent the following request for all NO2 sensor readings in the Air Quality theme for a 3 hour period. No response received after 20 minutes. Have tried it several times this afternoon, and similar requests intermittently over the past few weeks. I am not expecting to receive much data back, however I'm not sure whether this assumption is correct? Maybe this call is actually returning all the sensor telemetry/diagnostic info, and I should be using something else? It would be helpful if the API docs gave example returns for the sample requests. Here's the request:

http://uoweb3.ncl.ac.uk/api/v1.1/sensors/data/json/?starttime=20190523120000&endtime=20190523150000&theme=Air+Quality&data_variable=NO2&bbox_p1_x=-1.7353&bbox_p1_y=54.9484&bbox_p2_x=-1.4298&bbox_p2_y=55.0563

Even adding "last_n_records=100" makes no difference. Still no response.

My eventual goal is to be able to call the UO API from Ajax requests in a front-end application, possibly linking said requests to the progress of a timeslider, so I need these requests to take a few seconds max. Should this not be realistic, is it possible to get a more low-level access to the data directly via the database? The only way I can see otherwise of doing this is doing a bulk daily download at night and ingesting into my own PostGIS instance. This seems to defeat the purpose of the API, and uses up large amounts of space on a VM anyway. BTW I see I could get all the relevant sensor names and get the readings for each individually, which seems rather longwinded.

@geoanorak
Copy link

Thanks David, we'll take a look. The API has been a bit of an issue for a while with larger calls.

@nharris172
Copy link
Member

This should now be faster.

@davidherbert2
Copy link
Author

Yep - can confirm that this request now takes 4-5 seconds to execute. Thanks Neil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants