AirGradient Forum

Recent change to API payload?

Was there a change made recently to the API payload structure? Specifically, when using the GET /measure/current call, the numeric values in the response used to return as numeric in JSON. A few days ago, due to some notifications from my application, I noticed that all values are now being returned as string.

image

Is this a permanent change?

TIA,
Sanjay

1 Like

Hi @spcherub - yes there was a recent chance to the payload structure. I believe there was another change after this change to make this non-breaking. Double quotes for floating point number are now removed:

Before:

“pm01”: “0.0”,
“pm02”: “0.0”,
“pm10”: “0.2”,

After:

“pm01”: 0.0,
“pm02”: 2.0,
“pm10”: 2.0,

Hi @Altair_AirGradient - so the payload is updated again to revert numbers to numeric (without quotes)?

Was there a notification about changes to the payload? If so, how can I subscribe to these notifications?

Thanks,
Sanjay

2 Likes