Get Device Specification Attribute

Last Updated on : 2024-01-11 05:55:52download

Based on the device ID, get the instruction set and status set of the specified device.

API address

GET: /v1.0/devices/{deviceId}/specifications

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultDeviceSpecificationsResThe returned result.

Description of result

Parameter nameTypeDescription
categoryStringThe product category.
functionsListThe instruction set.
statusListThe status set.

Description of functions

Parameter nameTypeDescription
codeStringThe code of a specified instruction.
typeStringThe type.
valuesStringThe value range.

Description of status

Parameter nameTypeDescription
codeStringThe status code.
typeStringThe type.
valuesStringThe value range.

Request example

GET: /v1.0/devices/vdevo*************/specifications

Return example

{
    "tid": "6e4748477d3e11ee82c7664ef4d3e193",
    "result": {
        "functions": [
            {
                "code": "switch",
                "values": "{}",
                "type": "Boolean"
            },
            {
                "code": "mode",
                "values": "{\"range\":[\"click\",\"switch\"]}",
                "type": "Enum"
            }
        ],
        "category": "szjqr",
        "status": [
            {
                "code": "switch",
                "values": "{}",
                "type": "Boolean"
            }
        ]
    },
    "t": 1699341758699,
    "success": true
}

Error code

For more information, see error code.