You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently unable to get averagingPeriod with v2 and output json. I believe that this was previously operational.
For replication, I am copying the URLs built with the "try it" documentation interface (https://api.openaq.org/docs). Each is designed to output one (the same) measurement. Both request averagingPeriod, but only v1 receives it.
Thanks for raising this issue. It looks like v2 has never supported the includes_fields when outputting json. From what I can tell it looks like an oversight in the original implementation. I can take a look and see what it would take to allow it in the v2/measurements without format=csv and see if its feasible.
What would be the "right" way to include averagingPeriod in csv. I am using JSON because when I first started, CSV didn't support object type subfields. Although it would be nice if this worked in JSON, I could be persuaded to move to CSV. (BTW - that was v1)
I see now that if I ask for averagingPeriod in CSV, I do get it. It is formatted as a python dictionary field. I can unpack that as columns (averagingPeriod_value and averagingPeriod_unit). If there is a better way, let me know.
I am currently unable to get averagingPeriod with v2 and output json. I believe that this was previously operational.
For replication, I am copying the URLs built with the "try it" documentation interface (https://api.openaq.org/docs). Each is designed to output one (the same) measurement. Both request averagingPeriod, but only v1 receives it.
Version 1
https://api.openaq.org/v1/measurements?format=json&date_from=2022-10-01T00%3A00%3A00%2B00%3A00&date_to=2022-10-03T18%3A03%3A00%2B00%3A00&limit=1&page=1&offset=0&sort=desc¶meter=pm25&radius=1000&country_id=US&order_by=datetime&isMobile=false&isAnalysis=false&entity=government&sensorType=reference%20grade&include_fields=averagingPeriod
Version 2
https://api.openaq.org/v2/measurements?format=json&date_from=2022-10-01T00%3A00%3A00%2B00%3A00&date_to=2022-10-03T18%3A03%3A00%2B00%3A00&limit=1&page=1&offset=0&sort=desc¶meter=pm25&radius=1000&country_id=US&order_by=datetime&isMobile=false&isAnalysis=false&entity=government&sensorType=reference%20grade&include_fields=averagingPeriod
Thanks for any advice.
The text was updated successfully, but these errors were encountered: