Call this operation to query groups.

Request parameters

Parameter Type Required Description
Action String Yes The action that you want to perform. Set the value to QueryDeviceGroupList.
GroupName String No Group name.
  • If you specify a group name, the group that you specified will be queried.
  • If you do not specify any group name, all the groups will be queried.
SuperGroupId String No The ID of the parent group. If you want to query the sub-groups of a parent group, specify the parent group ID.
PageSize Integer No The number of groups per page. The maximum value is 200.
CurrentPage Integer No Specifies the page of returned results to be displayed. The default value is 1.
Common request parameters - Yes see Common parameters.

Response parameters

Parameter Type Description
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.
PageCount Integer The total number of pages.
PageSize Integer The number of groups on each page.
CurrentPage Integer The current page number.
Total Integer The total number of groups.
Data Data The group information returned when the call is successful. See the following table GroupInfo.
Note The group information is listed in reverse chronological order.
Table 1. GroupInfo
Parameter Type Description
GroupName String The name of the group.
UtcCreate Date The time when the group was created.
GroupDesc String The description of the group.
GroupId String Group ID.

Example

Request example

http://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceGroupList
&PageSize=10
&CurrentPage=1
&Common request parameters

Response example

{
    "PageCount":3,
    "Data":{
        "GroupInfo":[
            {
                "GroupName":"test1",
                "UtcCreate":"2018-10-09T02:58:34.000Z",
                "GroupId":"Kzt9FD8wje8oW64y"
            },
            {
                "GroupName":"test2",
                "UtcCreate":"2018-10-09T02:56:40.000Z",
                "GroupId":"0ayrSQ3DSd7uXXXC"
            },
            {
                "GroupDesc":"Test",
                "GroupName":"test3",
                "UtcCreate":"2018-09-16T05:38:27.000Z",
                "GroupId":"oWXlIQeFZtzCNsAV"
            },
            {
                "GroupName":"ylv0915",
                "UtcCreate":"2018-09-15T04:51:56.000Z",
                "GroupId":"SfEiVapLPUjBVvSq"
            },
            {
                "GroupName":"ydlv",
                "UtcCreate":"2018-09-14T14:35:51.000Z",
                "GroupId":"z2S2h9NsDTZmH8MR"
            },
            {
                "GroupName":"ldh_group_3",
                "UtcCreate":"2018-09-14T12:26:20.000Z",
                "GroupId":"chn5fkjinXGc7pGl"
            },
            {
                "GroupDesc":"ddd",
                "GroupName":"ylvgisbim",
                "UtcCreate":"2018-09-14T11:41:20.000Z",
                "GroupId":"ncUZ8DjWYaB9RxlO"
            },
            {
                "GroupName":"abc",
                "UtcCreate":"2018-09-14T09:14:30.000Z",
                "GroupId":"zpdvwxzBdt4FljYf"
            },
            {
                "GroupName":"test11",
                "UtcCreate":"2018-09-14T07:22:39.000Z",
                "GroupId":"BTaudF16X2xKQBNa"
            },
            {
                "GroupName":"testy",
                "UtcCreate":"2018-09-14T01:58:06.000Z",
                "GroupId":"PrTm3VOeggPwRUKQ"
            }
        ]
    },
    "PageSize":10,
    "RequestId":"BEFCA316-D6C7-470C-81ED-1FF4FFD4AA0D",
    "CurrentPage":1,
    "Success":true,
    "Total":24
}