Get Instruction Set Supported by Device

Last Updated on : 2024-01-11 05:59:58download

Query the functions supported by the specified device, and the obtained instructions can be sent to control the device.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultFunctionResThe returned result.

Description of result

Parameter nameTypeDescription
categoryStringThe product category.
functionsListThe instruction set.

Description of functions

Parameter nameTypeDescription
nameStringThe name of the specified instruction.
descStringThe description of the specified instruction.
codeStringThe code of the specified instruction.
typeStringThe type of the specified instruction.
valuesStringThe input parameter range of the specified instruction.

Request example

GET: /v1.0/devices/0123******/functions

Return example

    "functions": [
            "code": "switch_led",
            "values": "{}",
            "type": "Boolean",
            "name": "Switch",
            "desc": "LED Switch"
    "category": "dj"

Error code

For more information, see error code.