Query Latest Alerts

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

Query the latest alerts of a specified industrial device by the device code.

API address

GET: /v1.1/iot-03/si/devices/{device_code}/latest-alarm

Request parameter

Parameter nameTypeINRequiredDescription
device_codeStringuritrueThe code of a specified device.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
typeStringThe type of an alert.
contentStringThe content of an alert.
timeLongThe time.

Request example

GET: /v1.1/iot-03/si/devices/cnc/latest-alarm

Return example

{
    "result": [
        {
            "type": "Fault",
            "content": "100",
            "time": 1637312944223
        },
        {
            "type": "Fault",
            "content": "100",
            "time": 1637312944223
        },
        {
            "type": "Fault",
            "content": "100",
            "time": 1637312944223
        }
    ],
    "t": 1638200144685,
    "success": true
}

Error code

For more information, see error code.