Queries the devices of a group.
Limits
Each Alibaba Cloud account can run a maximum of 5 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryDeviceListByDeviceGroup |
The operation that you want to perform. Set the value to QueryDeviceListByDeviceGroup. |
GroupId | String | Yes | 7DIgqIl1Ijnh**** |
The ID of the group. The ID is the globally unique identifier (GUID) for the group. |
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
For more information, see Overview. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. |
CurrentPage | Integer | No | 1 |
The number of the page to return. |
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. |
Data | Array of SimpleDeviceInfo |
The device list information returned if the call succeeds. For more information, see the following SimpleDeviceInfo parameter. |
|
SimpleDeviceInfo | |||
DeviceName | String | ios_1207_08 |
The name of each device. |
IotId | String | TfmUAeJjQQhCPH84UVNn0010c6**** |
The ID of the device. The ID is the unique identifier that is issued by IoT Platform to the device. |
ProductKey | String | a1hWjHD**** |
The ProductKey of the product to which the device belongs. |
ProductName | String | WIFIdevice |
The ProductName of the product to which the device belongs. |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
Page | Integer | 1 |
The number of the returned page. |
PageCount | Integer | 1 |
The total number of pages. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | B1A921D9-1061-4D45-9F12-EA6B0FDEDE30 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Total | Integer | 3 |
The total number of devices. |
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceListByDeviceGroup
&GroupId=7DIgqIl1Ijnh****
&CurrentPage=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
<QueryDeviceListByDeviceGroupResponse>
<PageCount>1</PageCount>
<Data>
<SimpleDeviceInfo>
<DeviceName>ios_1207_08</DeviceName>
<ProductKey>a1hWjHD****</ProductKey>
<ProductName>WIFIdevice</ProductName>
<IotId>TfmUAeJjQQhCPH84UVNn0010c6****</IotId>
</SimpleDeviceInfo>
<SimpleDeviceInfo>
<DeviceName>ios_1207_07</DeviceName>
<ProductKey>a1hWjHD****</ProductKey>
<ProductName>WIFIgateway</ProductName>
<IotId>wVPeAksaboXBlRgvZNHQ001031****</IotId>
</SimpleDeviceInfo>
<SimpleDeviceInfo>
<DeviceName>E1IPK25iL4CTOwnuI2yt</DeviceName>
<ProductKey>a1mV8bK****</ProductKey>
<ProductName>yanlv</ProductName>
<IotId>E1IPK25iL4CTOwnuI2yt001059****</IotId>
</SimpleDeviceInfo>
</Data>
<PageSize>10</PageSize>
<Page>1</Page>
<RequestId>B1A921D9-1061-4D45-9F12-EA6B0FDEDE30</RequestId>
<Success>true</Success>
<Total>3</Total>
</QueryDeviceListByDeviceGroupResponse>
JSON
format
{
"PageCount": 1,
"Data": {
"SimpleDeviceInfo": [
{
"DeviceName": "ios_1207_08",
"ProductKey": "a1hWjHD****",
"ProductName": "WIFIdevice",
"IotId": "TfmUAeJjQQhCPH84UVNn0010c6****"
},
{
"DeviceName": "ios_1207_07",
"ProductKey": "a1hWjHD****",
"ProductName": "WIFIgateway",
"IotId": "wVPeAksaboXBlRgvZNHQ001031****"
},
{
"DeviceName": "E1IPK25iL4CTOwnuI2yt",
"ProductKey": "a1mV8bK****",
"ProductName": "yanlv",
"IotId": "E1IPK25iL4CTOwnuI2yt001059****"
}
]
},
"PageSize": 10,
"Page": 1,
"RequestId": "B1A921D9-1061-4D45-9F12-EA6B0FDEDE30",
"Success": true,
"Total": 3
}
Error codes
For a list of error codes, visit the API Error Center.