Control Group Devices

Last Updated on : 2023-07-06 07:50:00download

Control the specified group based on the standard instruction set.

API address

POST: /v1.0/iot-03/device-groups/{group_id}/actions/control

Request parameter

Parameter nameTypeINRequiredDescription
group_idStringuritrueThe ID of the specified group.

Description of body

Parameter nameTypeINRequiredDescription
functionList trueThe instruction set that applies to the device group.

Description of function

Parameter nameTypeINRequiredDescription
codeString trueThe code of the standard instruction that is sent to the devices.
valueObject trueThe value of the standard instruction that is sent to the devices.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful.

Request example

POST: /v1.0/iot-03/device-groups/sdjklwejrk234***/actions/control
[
  {
    "code": "switch_1",
    "value": true
  },
  {
    "code": "countdown_1",
    "value": 600
  }
]

Return example

{
    "result": true,
    "t": 1629277179179,
    "success": true
}

Error code

For more information, see error code.