Get Instruction Set of Device Group

Last Updated on : 2023-07-06 07:48:49download

Get the standard instruction set supported by a specified device group based on the group ID.

API address

GET: /v1.0/iot-03/device-groups/{group_id}/functions

Request parameter

Parameter nameTypeINRequiredDescription
group_idStringuritrueThe ID of a specified group.

Return parameter

Parameter nameTypeDescription
resultGroupFunctionResThe returned result.

Description of result

Parameter nameTypeDescription
group_idStringThe ID of a specified group.
functionsListThe list of instruction sets.

Description of functions

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

Request example

GET: /v1.0/iot-03/device-groups/14123451739****/functions

Return example

{
    "result": {
        "functions": [
            {
                "code": "countdown_1",
                "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
                "type": "Integer",
                "name": "countdown 1",
                "desc": "Countdown Switch"
            },
            {
                "code": "switch",
                "values": "{}",
                "type": "Boolean",
                "name": "switch",
                "desc": "Switch"
            }
        ],
        "group_id": "14123451739****"
    },
    "t": 1625627534373,
    "success": true
}

Error code

For more information, see error code.