Call this operation to delete devices from a group ( only to delete the relationship between devices and groups, not to delete devices from IoT Platform).

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set this value to BatchDeleteDeviceGroupRelations.
Group ID String Yes The group ID that is the unique identifier of the group.
Devices List<Device> Yes The devices that you want to delete from the group. See the following table Device.
Common request parameters - Yes see Common parameters.
Table 1. Device 
Parameter Type Required Description
ProductKey String Yes The ProductKey of the device.
DeviceName String Yes The DeviceName of the device.

Response parameters

Parameter Type Description
ValidDeviceCount Integer The number of valid devices that are listed in the request (the number of devices that can be deleted).
SuccessDeviceCount Integer The number of devices that have been deleted from the group.
AlreadyRelatedGroupDeviceCount Integer The number of devices that are in the group before this deletion.
RequestId String The globally unique ID generated by Alibaba Cloud for the request.
Success Boolean​ Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String The error message returned when the call fails. 
Code String For error codes, see Error codes.

Example

Request example

http://iot.cn-shanghai.aliyuncs.com/?Action=BatchDeleteDeviceGroupRelations
&Device. 1. DeviceName=ZHuPo6sZzv7pOzYhv31y
&Device. 1. ProductKey=a1kORrKiwQj
&Device. 2. DeviceName=rB4V9PDW2FCPmwuf2N3Y
&Device. 2. ProductKey=a1kORrKiwQj
&GroupId=W16X8TvdosecZu91
&Common request parameters

Response example

{
    "SuccessDeviceCount":2,
    "ValidDeviceCount":2
    "AlreadyRelatedGroupDeviceCount":2,
    "RequestId":"8739385E-143F-4389-B900-B7DF9174CE0D",
    "Success":true    
}