Get the instruction sets in bulk

Last Updated on : 2023-06-20 15:37:31download

Get the instruction sets of up to 20 devices.

API address

GET: /v1.0/devices/functions

Request parameter

Parameter nameTypeINRequiredDescription
device_idsStringqueryfalseThe list of up to 20 device IDs, separated by commas

Return parameter

Parameter nameTypeDescription
resultListDevice collection, instruction collection, and classification

Description of result

Parameter nameTypeDescription
categoryStringProduct category
functionsListInstruction set
devicesListThe list of device IDs

Description of functions

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

Description of devices

Parameter nameTypeDescription
devicesStringDevice ID

Request example

GET: /v1.0/devices/functions?deviceIds=002000285ccf7f1b7eeb,002000286001940f20e7,003000286001940f20e6

Return example

[
    {
        "functions": [
            {
                "code": "switch_led",
                "desc": "Switch"
            }
        ],
        "devices": [
            "xxx",
            "xxx"
        ],
        "category": "dj"
    },
    {
        "functions": [
            {
                "code": "switch_led",
                "desc": "Switch"
            }
        ],
        "devices": [
            "xx"
        ],
        "category": "led"
    }
]

Error code

For more information, see error code.