Call this operation to query all the devices in a device group.

Request parameters

Parameter Type Required Description
Action String Yes The operation that is to be performed. Set the value to QueryDeviceListByDeviceGroup.
GroupId String Yes The unique identifier of a group.
CurrentPage Integer No The page of returned results to be displayed. The default value is 1.
PageSize Integer No The number of devices displayed per page in the response. The default value is 10.
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 information about error codes, see Error codes.
Page Integer The current page number.
PageSize Integer   The number of devices displayed per page.
PageCount Integer The total number of pages.
Total Integer The total number of devices.
Data List The information of devices returned when the call is successful. For more information, see the following table.
Table 1. SimpleDeviceInfo
Parameter Type Description
ProductName String The name of the product to which the device belongs.
ProductKey String The unique identifier of the product.
DeviceName String The device name.
IotId String The globally unique ID issued by IoT Platform to the device.

Examples

Request example

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceListByDeviceGroup
&GroupId=7DIgqIl1IjnhBsrA
&Public Request Parameters

Response example

  • JSON format

    {
      "PageCount": 1,
      "Data": {
        "SimpleDeviceInfo": [
          {
            "DeviceName": "ios_1207_08",
            "ProductKey": "a1hWjHDWUbF",
            "ProductName": "WIFIdevice",
            "IotId": "TfmUAeJjQQhCPH84UVNn0010c66100"
          },
          {
            "DeviceName": "ios_1207_07",
            "ProductKey": "a1hWjHDWUbF",
            "ProductName": "WIFIgateway",
            "IotId": "wVPeAksaboXBlRgvZNHQ0010310800"
          },
          {
            "DeviceName": "E1IPK25iL4CTOwnuI2yt",
            "ProductKey": "a1mV8bKjeP6",
            "ProductName": "yanlv",
            "IotId": "E1IPK25iL4CTOwnuI2yt0010598d00"
          }
        ]
      },
      "PageSize": 10,
      "Page": 1,
      "RequestId": "B1A921D9-1061-4D45-9F12-EA6B0FDEDE30",
      "Success": true,
      "Total": 3
    }
  • XML format

    <? xml version="1.0" encoding="UTF-8" ? >
    <QueryDeviceListByDeviceGroup>
    	<PageCount>1</PageCount>
    	<Data>
    		<SimpleDeviceInfo>
    			<DeviceName>ios_1207_08</DeviceName>
    			<ProductKey>a1hWjHDWUbF</ProductKey>
    			<ProductName>WIFIdevice</ProductName>
    			<IotId>TfmUAeJjQQhCPH84UVNn0010c66100</IotId>
    		</SimpleDeviceInfo>
    		<SimpleDeviceInfo>
    			<DeviceName>ios_1207_07</DeviceName>
    			<ProductKey>a1hWjHDWUbF</ProductKey>
    			<ProductName>WIFIgateway</ProductName>
    			<IotId>wVPeAksaboXBlRgvZNHQ0010310800</IotId>
    		</SimpleDeviceInfo>
    		<SimpleDeviceInfo>
    			<DeviceName>E1IPK25iL4CTOwnuI2yt</DeviceName>
    			<ProductKey>a1mV8bKjeP6</ProductKey>
    			<ProductName>yanlv</ProductName>
    			<IotId>E1IPK25iL4CTOwnuI2yt0010598d00</IotId>
    		</SimpleDeviceInfo>
    	</Data>
    	<PageSize>10</PageSize>
    	<Page>1</Page>
    	<RequestId>B1A921D9-1061-4D45-9F12-EA6B0FDEDE30</RequestId>
    	<Success>true</Success>
    	<Total>3</Total>
    </QueryDeviceListByDeviceGroup>