English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Get the latest status of multiple devices

Last Updated on : 2022-04-29 05:36:57download

Get the latest status of multiple devices by the device IDs.

API address

GET: /v1.0/iot-03/devices/status

Request parameter

Parameter nameTypeINRequiredDescription
device_idsStringquerytrueThe device IDs. Multiple IDs are separated by a comma (,). Limit up to 20.

Return parameter

Parameter nameTypeDescription
resultList

Description of result

Parameter nameTypeDescription
idStringDevice ID
statusListThe list of device status

Description of status

Parameter nameTypeDescription
codeStringStatus code
valueObjectStatus value

Request example

GET: /v1.0/iot-03/devices/status?device_ids=xxxid1,xxxxid2

Return example

{
    "result": [
        {
            "id": "xxxxxx",
            "status": [
                {
                    "code": "switch_led",
                    "value": true
                },
                {
                    "code": "work_mode",
                    "value": "scene_2"
                }
            ]
        }
    ],
    "t": 1591872112140,
    "success": true
}

Error code

For more information, see error code.