When I access the API, it returns only the headers, no actual data. The “points” are still taken from my account. No errors are returned. For example, I make this request of my own sensor:
curl -X GET “https://api.purpleair.com/v1/sensors/(sensor id)/history/csv?start_timestamp=1692832200&end_timestamp=1692832200&fields=pm2.5_alt” -H “X-API-Key: (my key)”
This is returned:
I have tried other fields, for example humidity and pm2.5 with the same (lack of) result. I can find the correct information using the map by downloading the CSV file. Please advise. Thank you!
EDIT: after playing around a bit I have learned that the start data and end date are NOT INCLUSIVE, that is, in order to get a specific date, it seems you need to have an end_timestamp AFTER your desired datapoint. It will still eat up your points without reporting the data at that time.