Get the instruction set of the device

Last Updated on : 2024-06-28 23:17:31download

Get the instruction set of the device by the device ID.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID

Return parameter

Parameter nameTypeDescription
resultFunctionRes

Description of result

Parameter nameTypeDescription
categoryStringProduct category
functionsListInstruction set

Description of functions

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

Request example

GET: /v1.0/iot-03/devices/0123xxxxxx/functions

Return example

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

Error code

For more information, see error code.