Query Data Statistics

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

Query the device data of a specified tenant based on the monitored object ID, device type code, time, and time type.

API address

GET: /v1.0/iot-03/si/datapoint/analysis/statistics

Request parameter

Parameter nameTypeINRequiredDescription
dateStringquerytrueThe date string.
typeIntegerquerytrueThe time type. Valid values:
  • 1: day.
  • 2: month.
  • 3: year.
device_type_codeStringquerytrueThe code of a specified device type.
monitor_object_idsStringquerytrueThe ID of a specified monitored object. Multiple IDs are separated by a comma (,).

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
data_listListThe list of data.
monitor_object_nameStringThe name of a specified monitored object.

Description of data_list

Parameter nameTypeDescription
keyLongThe time point.
valueDoubleThe value of the data.

Request example

GET: /v1.0/iot-03/si/datapoint/analysis/statistics?date=2021-10&type=2&monitor_object_ids=163****,163****&device_type_code=water

Return example

    "result": [
            "data_list": [
                    "value": 0,
                    "key": 20211026
                    "value": 10.644,
                    "key": 20211027
                    "value": 12.099,
                    "key": 20211028
            "monitor_object_name": "Energy Consumption 01"
    "t": 1635500340208,
    "success": true

Error code

For more information, see error code.