Delete Device Group

Last Updated on : 2023-07-06 07:52:33download

Delete a specified device group by group ID. If no device is in the device group, the returned result does not contain a task ID and expiration time. If there is a device in the device group, call the API operation of querying the group task information to check whether the task is successful based on the task ID.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
group_idStringuritrueThe group ID.

Return parameter

Parameter nameTypeDescription
resultGroupPackageTaskVOThe task information about deleting a specific group.

Description of result

Parameter nameTypeDescription
group_idStringThe group ID.
task_idStringThe task ID. The value is empty if there is no device in the group.
expire_timeLongThe time when the task expires. Unit: seconds. The value is empty if there is no device in the group.

Request example

DELETE: /v1.0/iot-03/device-groups/14055xxxxxx192768

Return example

{
    "result": {
        "expired_seconds": 14,
        "task_id": "140552xxxxx6296192",
        "group_id": "14055xxxxx0192768"
    },
    "t": 1623938309940,
    "success": true
}

Error code

For more information, see error code.