Get the instruction set supported by the device

Last Updated on : 2023-12-07 03:33:50download

Query the functions supported by the device, and the obtained instructions can be used to issue control.

API address

GET: /v1.0/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
nameStringCommand name
descStringDescription
codeStringCommand
typeStringCommand Type
valuesStringCommand into the parameter range

Request example

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

Return example

{
    "functions": [
        {
            "code": "switch_led",
            "values": "{}",
            "type": "Boolean"
        }
    ],
    "category": "dj"
}

Error code

For more information, see error code.