Get the specifications and properties of the device

Last Updated on : 2024-09-10 01:49:18

Get the specifications and properties of the device by the device ID, including the instruction set and status set.

API address

GET: /v1.0/iot-03/devices/{device_id}/specification

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID

Return parameter

Parameter nameTypeDescription
resultFunctionStatusRes

Description of result

Parameter nameTypeDescription
categoryStringProduct category
functionsListInstruction set
statusListStatus set

Description of functions

Parameter nameTypeDescription
nameStringInstruction name
descStringDescription
codeStringInstruction
typeStringInstruction type
valuesStringThe input parameter range of the instruction

Description of status

Parameter nameTypeDescription
codeStringStatus code
nameStringStatus name
typeStringType
valuesStringThe input parameter range

Request example

GET: /v1.0/iot-03/devices/xxxid/specification

Return example

{
    "result": {
        "functions": [
            {
                "code": "switch",
                "values": "{}",
                "type": "Boolean",
                "name": "Switch",
                "desc": "{}"
            }
        ],
        "category": "dj",
        "status": [
            {
                "code": "switch_led",
                "values": "{}",
                "type": "Boolean",
                "name": "switch"
            }
        ]
    },
    "t": 1591872112140,
    "success": true
}

Error code

For more information, see error code.