Query Data Point Overview

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

Query the data point overview about all device types of a specified tenant.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_type_codesStringquerytrueThe code of a specified device type.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
today_dataDoubleToday's data.
compared_yesterdayDoubleCompared to yesterday's data.
month_dataDoubleThe data of the current month.
compared_last_monthDoubleCompared to the data of the last month.
year_dataDoubleThe data of the current year.
compared_last_yearDoubleCompared to the data of the last year.
device_type_nameStringThe name of a specified device type.
device_type_codeStringThe code of a specified device type.
unitStringThe unit.

Request example

GET: /v1.0/iot-03/si/datapoint/analysis/survey?device_type_codes=water,GAS,electric

Return example

{
    "result": [
        {
            "today_data": 0,
            "device_type_name": "Electricity",
            "compared_last_month": 1,
            "month_data": 228.43,
            "compared_yesterday": -1,
            "year_data": 228.43,
            "unit": "KWH",
            "device_type_code": "electric",
            "compared_last_year": 1
        },
        {
            "today_data": 0,
            "device_type_name": "Natural Gas",
            "compared_last_month": 1,
            "month_data": 22.755,
            "compared_yesterday": -1,
            "year_data": 22.755,
            "unit": "Nm³",
            "device_type_code": "GAS",
            "compared_last_year": 1
        },
        {
            "today_data": 0,
            "device_type_name": "Water",
            "compared_last_month": 1,
            "month_data": 22.743,
            "compared_yesterday": -1,
            "year_data": 22.743,
            "unit": "T",
            "device_type_code": "water",
            "compared_last_year": 1
        }
    ],
    "t": 1635498073214,
    "success": true
}

Error code

For more information, see error code.