Is there any available API documentation for the AirGradient dashboard? I have been playing around with ESPHome and would like to send data to the AirGradient dashboard but the only info I can find about the API is to mimic the call/structure in the DIY instructions. It would be great if there were some documentation to reference as a source-of-truth.
I agree with this request. Is there anything available? I got into the Arduino code to pull the valid fields, but a true API documentation resource would be prefered.
We have our public API documented here.
But that does not (yet) contain the POST calls from the sensor. I will talk to our developers to add that.
I’m still not seeing the POST data for the /measures endpoint on the API page:
https://api.airgradient.com/public/docs/api/v1/
I see it still shows /v1 for the version, but it looks like things are changing.
In ESPHome I’m using rhumCompensated
, but according to this page I see rhum_corrected
under the Models/Measures section, but I’m not sure if that is even accurate.
I actually came here to see if there was a new field for the PM 2.5 corrected value, or one for the raw value from the sensors, but I’m not any more clear.
In the API page I see pm02_corrected
but I don’t see this in the source files of AgValue.cpp or OpenMetrics.cpp
I do see pm02Compensated
in those .cpp files, so is that the most accurate?
Ultimately, I would like to see the API reference page be up to date and accurate with the actual endpoints to be used and if fields are changing, that is the call for a new Version of the API so things don’t break if properties are being modified.
Is there an updated API implementation and documentation that returns payloads of locationID, serialno, groupId, placeId, etc. for the app.airgradient.com app server?
I see no way to get elements without knowing the IDs by looking at the dashboard in a browser. There should be a top level API call that returns IDs such that the API is self describing.
That’s exactly what I needed and works well, thank you.