Query Year-on-Year Data Analytics

Last Updated on : 2023-06-15 06:01:12

Query the year-on-year data analytics of devices under a specified tenant based on the year, monitored object ID, and the device type code.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
dateStringquerytrueThe year.
device_type_codeStringquerytrueThe code of a specified device type.
monitor_object_idStringquerytrueThe ID of a specified monitored object.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
current_valueDoubleThe value of the current period.
last_valueDoubleThe value of the last period.
monthLongThe month.
compared_valueDoubleThe year-on-year value.

Request example

GET: /v1.0/iot-03/si/datapoint/analysis/statistics/compare?date=2021&monitor_object_id=163****&device_type_code=water

Return example

{
    "result": [
        {
            "current_value": 22.743,
            "month": 202110
        }
    ],
    "t": 1635501092194,
    "success": true
}

Error code

For more information, see error code.