Modify Custom Group

Last Updated on : 2023-06-15 06:09:20

Modify a custom group, including the group information and devices in the group.

API address

PUT: /v1.0/iot-02/lighting/groups/package

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
spaceIdStringbodytrueThe ID of a specified space.
nameStringbodytrueThe name of a specified group.
groupPackageIdStringbodytrueThe ID of a specified custom group.
deviceIdsString[]bodytrueThe list of device IDs that need to be changed. The device IDs that are already in the group will be deleted, and those not in the group will be added.
ownerIdStringbodyfalseThe ID of a specified home group.
groupConfigsStringbodyfalseThe extension parameter.

Return parameter

Parameter nameTypeDescription
groupPackageIdStringThe ID of a specified custom group.
taskIdStringThe number of device status. If the value of null is returned, the task is completed without showing the time-consuming operation.
expiredSecondslongThe remaining seconds before the task expires. If the value of null is returned, the task is completed without showing the time-consuming operation.
groupIdslong[]The ID of a specified device group.

Request example

PUT: /v1.0/iot-02/lighting/groups/package
{
  "spaceId": "146886924268113****",
  "name": "Custom Group 123456",
  "deviceIds": [
    "vdevo16400687183****"
  ],
  "ownerId": "4536****",
  "groupPackageId": "147564952996027****",
  "groupConfigs": "test-update"
}

Return example

{
    "result": {
        "expiredSeconds": 10,
        "groupPackageId": "147564952996027****",
        "taskId": "147565544970447****"
    },
    "t": 1640658650274,
    "success": true
}

Error code

For more information, see error code.