Queries groups by page.

Limits

Each Alibaba Cloud account can run a maximum of 100 queries per second (QPS).

Note RAM users of an Alibaba Cloud account share the quota of the account.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes QueryDeviceGroupList

The operation that you want to perform. Set the value to QueryDeviceGroupList.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

For more information, see Overview.

PageSize Integer No 10

The number of the entries to return on each page. Maximum value: 200. Default value: 10.

SuperGroupId String No 8vDubXr4nUvZkNgk9mle010200

The ID of the parent group. If you need to query the subgroups of a parent group, specify this parameter.

GroupName String No GroupName1

The name of the group.

  • If you specify this parameter, the system queries groups by group name. You can perform a fuzzy search by group name.
  • If you do not specify this parameter, the system queries all groups.
CurrentPage Integer No 1

The number of the page to return. Default value: 1.

GroupTypes.N RepeatList No LINK_PLATFORM_DYNAMIC

The type of the group to be queried.

Set the value to LINK_PLATFORM_DYNAMIC. This value indicates a dynamic group. If you do not specify this parameter, a static group is queried by default.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

CurrentPage Integer 1

The page number of the returned page.

Data Array of GroupInfo

The group information returned if the call succeeds. For more information, see the GroupInfo parameter.

Note The returned group information is sorted in reverse chronological order in which the groups are created.
GroupInfo
GroupDesc String usefulGroup

The description of the group.

GroupId String Kzt9FD8wje8o****

The ID of the group.

GroupName String test1

The name of the group.

GroupType String LINK_PLATFORM_DYNAMIC

The type of the group.

UtcCreate String 2018-10-09T02:58:34.000Z

The time when the group was created.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

PageCount Integer 3

The total number of pages.

PageSize Integer 10

The number of entries return on each page.

RequestId String BEFCA316-D6C7-470C-81ED-1FF4FFD4AA0D

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.
Total Integer 24

The total number of records that were returned.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceGroupList
&PageSize=10
&CurrentPage=1
&GroupTypes.1=LINK_PLATFORM_DYNAMIC
&<Common request parameters>

Sample success responses

XML format

<QueryDeviceGroupListResponse>
  <PageCount>3</PageCount>
  <Data>
        <GroupInfo>
              <GroupName>test1</GroupName>
              <UtcCreate>2021-10-01T02:58:34.000Z</UtcCreate>
              <GroupId>Kzt9FD8wje8o***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>test2</GroupName>
              <UtcCreate>2021-10-01T02:56:40.000Z</UtcCreate>
              <GroupId>0ayrSQ3DSd7***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupDesc>Test</GroupDesc>
              <GroupName>test3</GroupName>
              <UtcCreate>2021-10-01T05:38:27.000Z</UtcCreate>
              <GroupId>oWXlIQeFZtzC***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>ylv0915</GroupName>
              <UtcCreate>2021-10-01T04:51:56.000Z</UtcCreate>
              <GroupId>SfEiVapLPUjB***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>ydlv</GroupName>
              <UtcCreate>2021-10-01T14:35:51.000Z</UtcCreate>
              <GroupId>z2S2h9NsDTZm***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>ldh_group_3</GroupName>
              <UtcCreate>2021-10-01T12:26:20.000Z</UtcCreate>
              <GroupId>chn5fkjin***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupDesc>ddd</GroupDesc>
              <GroupName>ylvgisbim</GroupName>
              <UtcCreate>2021-10-01T11:41:20.000Z</UtcCreate>
              <GroupId>ncUZ8DjWYaB9***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>abc</GroupName>
              <UtcCreate>2021-10-01T09:14:30.000Z</UtcCreate>
              <GroupId>zpdvwxzBdt4F***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>test11</GroupName>
              <UtcCreate>2021-10-01T07:22:39.000Z</UtcCreate>
              <GroupId>BTaudF16X2xK***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
        <GroupInfo>
              <GroupName>testy</GroupName>
              <UtcCreate>2021-10-01T01:58:06.000Z</UtcCreate>
              <GroupId>PrTm3VOeggPw***</GroupId>
              <GroupType>LINK_PLATFORM_DYNAMIC</GroupType>
        </GroupInfo>
  </Data>
  <PageSize>10</PageSize>
  <RequestId>BEFCA316-D6C7-470C-81ED-1FF4FFD4AA0D</RequestId>
  <CurrentPage>1</CurrentPage>
  <Success>true</Success>
  <Total>24</Total>
</QueryDeviceGroupListResponse>

JSON format

{
    "PageCount":3,
    "Data":{
        "GroupInfo":[
            {
                "GroupName":"test1",
                "UtcCreate":"2021-10-01T02:58:34.000Z",
                "GroupId":"Kzt9FD8wje8o***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"test2",
                "UtcCreate":"2021-10-01T02:56:40.000Z",
                "GroupId":"0ayrSQ3DSd7***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupDesc":"Test",
                "GroupName":"test3",
                "UtcCreate":"2021-10-01T05:38:27.000Z",
                "GroupId":"oWXlIQeFZtzC***",
                "GroupType":"LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"ylv0915",
                "UtcCreate":"2021-10-01T04:51:56.000Z",
                "GroupId":"SfEiVapLPUjB***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"ydlv",
                "UtcCreate":"2021-10-01T14:35:51.000Z",
                "GroupId":"z2S2h9NsDTZm***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"ldh_group_3",
                "UtcCreate":"2021-10-01T12:26:20.000Z",
                "GroupId":"chn5fkjin***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupDesc":"ddd",
                "GroupName":"ylvgisbim",
                "UtcCreate":"2021-10-01T11:41:20.000Z",
                "GroupId":"ncUZ8DjWYaB9***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"abc",
                "UtcCreate":"2021-10-01T09:14:30.000Z",
                "GroupId":"zpdvwxzBdt4F***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"test11",
                "UtcCreate":"2021-10-01T07:22:39.000Z",
                "GroupId":"BTaudF16X2xK***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            },
            {
                "GroupName":"testy",
                "UtcCreate":"2021-10-01T01:58:06.000Z",
                "GroupId":"PrTm3VOeggPw***",
                "GroupType": "LINK_PLATFORM_DYNAMIC"
            }
        ]
    },
    "PageSize":10,
    "RequestId":"BEFCA316-D6C7-470C-81ED-1FF4FFD4AA0D",
    "CurrentPage":1,
    "Success":true,
    "Total":24
}

Error codes

For a list of error codes, visit the API Error Center.