Query Environmental Indicators

Last Updated on : 2023-06-15 05:40:57

According to the node under the asset or custom dimension, query the statistical data of environmental indicators over a period of time, including temperature, humidity, CO2, and formaldehyde.

API address

GET: /v1.1/iot-03/environment-indicators/statistics

Request parameter

Parameter name Type IN Required Description
indicator_codes String query true The indicators. You can query up to 10 indicators each time.
dimension_code String query true The dimension type.
node_ids String query true The node under the specified dimension. You can query up to 20 nodes each time.
statistics_type String query false The statistics type. Default value: hour.
  • hour: by hour.
  • day: by day.
  • month: by month.
statistics_function String query false The statistical function. Default value: AVG.
  • AVG: the average value.
  • MIN: the minimum value.
  • MAX: the maximum value.
start_time String query true The start time. The format is linked with statistics_type.
  • When statistics_type is hour, it is yyyyMMddHH.
  • When statistics_type is day, it is yyyyMMdd.
  • When statistics_type is month, it is yyyyMM.
end_time String query true The end time. The format is linked with statistics_type.
  • When statistics_type is hour, it is yyyyMMddHH.
  • When statistics_type is day, it is yyyyMMdd.
  • When statistics_type is month, it is yyyyMM.

Return parameter

Parameter name Type Description
result EnvironmentIndicatorRes The returned result.

Description of result

Parameter name Type Description
indicators List The data of a specified indicator.

Description of indicators

Parameter name Type Description
code String The code of a specified indicator.
unit String The unit of the indicator values.
data_items List The time trend of the data.

Description of data_items

Parameter name Type Description
value String The code of a specified indicator.
time String The time.

Request example

GET: GET /v1.1/iot-03/environment-indicators/statistics?indicators=air_quality_value,voc_value,pm25_value

Return example

{ "result": { "indicators": [ { "code": "humidity_value", "unit": "%", "data_items": [ { "time": "2021090116", "value": "5.30" } ] }, { "code": "temperature_value", "unit": "℃", "data_items": [ { "time": "2021090116", "value": "26.60" } ] } ] }, "t": 1630586260147, "success": true }

Error code

For more information, see error code.