getOrganizationSensorReadingsHistory change in return data structure for MT14

sungod
Head in the Cloud

getOrganizationSensorReadingsHistory change in return data structure for MT14

The return from https://developer.cisco.com/meraki/api-v1/get-organization-sensor-readings-history/ for an MT14 used to include an element called 'readings' that contained an array of readings.

 

See... https://community.meraki.com/t5/Developers-APIs/Need-MT14-example-response/m-p/153770

 

I was testing all my scripts today following some general tidying up of how missing device names are handled following other recent API return changes, and I found the return for MT14 no longer includes this element, instead the readings have been unbundled.

 

This is more consistent with other sensors, but is a breaking change as my script expected this element.

 

New behaviour of call returns one reading per MT14 metric, instead of an array of all readings at time ts.

 

{'serial': 's', 'network': {'id': 'a', 'name': 'b'}, 'ts': '2023-08-29T01:21:45Z', 'metric': 'eco2', 'eco2': {'concentration': 668}}
{'serial': 's', 'network': {'id': 'a', 'name': 'b'}, 'ts': '2023-08-29T01:21:45Z', 'metric': 'indoorAirQuality', 'indoorAirQuality': {'score': 100}}
{'serial': 's', 'network': {'id': 'a', 'name': 'b'}, 'ts': '2023-08-29T01:21:45Z', 'metric': 'tvoc', 'tvoc': {'concentration': 220}}
{'serial': 's', 'network': {'id': 'a', 'name': 'b'}, 'ts': '2023-08-29T01:21:35Z', 'metric': 'humidity', 'humidity': {'relativePercentage': 54}}
{'serial': 's', 'network': {'id': 'a', 'name': 'b'}, 'ts': '2023-08-29T01:21:35Z', 'metric': 'temperature', 'temperature': {'fahrenheit': 69.4, 'celsius': 20.78}}

 

I wondered if I missed an announcement, but I searched and didn't find anything about this change.

2 Replies 2
John-K
Meraki Employee
Meraki Employee

sungod
Head in the Cloud

Different API call, but yes it looks like a similar change.

 

It's great that return structures are being made more consistent, but as in the other post about device info, it'd be useful if there was some place these changes were notified or at least documented.

 

I've now hit three different calls where a return structure change has broken automated reporting scripts and each time I've had to drop other things to investigate, fix, test and deploy. If there are more coming, it'd be much better to have some warning.

 

Get notified when there are additional replies to this discussion.