Cloud Services API Reference

Query Environmental Indicators of Assets

Last Updated on : 2023-06-21 07:13:05download

Based on the asset ID and the indicator code, query the statistical data of various environmental indicators under the specified asset for the past seven days.

API address

GET: /v1.0/iot-03/assets/{asset_id}/environment-statistics

Request parameter

Parameter name Type IN Required Description
asset_id String uri true The asset ID.
codes String query false The code of a specified indicator.

Return parameter

Parameter name Type Description
result AssetEnvironmentStatisticsRes

Description of result

Parameter name Type Description
asset_name String The asset name.
statistics_data List The statistical data.

Description of statistics_data

Parameter name Type Description
date String The statistical date.
codes List The list of indicator codes.

Description of codes

Parameter name Type Description
code String The code of a specified indicator.
avg String The average value of the indicators.
max String The maximum value of the indicators.
min String The minimum value of the indicators.
unit String The unit of the indicator values.

Request example

GET: GET /v1.0/iot-03/assets/1909388914****/environment-statistics?codes=lux_value

Return example

{ "result": { "statistics_data": [ { "date": "20210721", "codes": [ { "code": "lux_value", "max": "", "unit": "", "avg": "13.50", "min": "" } ] }, { "date": "20210720", "codes": [ { "code": "lux_value", "max": "", "unit": "", "avg": "27.99", "min": "" } ] }, { "date": "20210719", "codes": [ { "code": "lux_value", "max": "", "unit": "", "avg": "86.70", "min": "" } ] } ], "asset_name": "Classroom" }, "t": 1626835249902, "success": true }

Error code

For more information, see error code.