Queries multiple devices that are added at a time by application ID.
QPS limits
You can call this API operation up to 50 times per second per account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryImportedDeviceByApplyId | The operation that you want to perform. Set the value to QueryImportedDeviceByApplyId. |
ApplyId | Long | Yes | 1295006 | The application ID. You can call the BatchImportDevice operation to obtain the application ID. |
PageNo | Integer | Yes | 1 | The number of the page to return. Valid values: 1 to 10000. |
PageSize | Integer | Yes | 10 | The number of entries to return on each page. Default value: 10. Maximum value: 50. |
IotInstanceId | String | No | iot-1n8t**** | The ID of the instance. You can obtain the ID of the instance on the Overview page in the IoT Platform console. Important
For more information, see Overview. |
In addition to the preceding operation-specific request parameters, you must configure common request parameters when you call this operation. For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalPage | Integer | 100 | The total number of pages returned. |
PageNo | Integer | 1 | The page number of the returned page. |
PageSize | Integer | 10 | The number of entries returned per page. |
RequestId | String | E4C0FF92-2A86-41DB-92D3-73B60310D25E | The ID of the request. |
ProductKey | String | a1BwAGV**** | The ProductKey of the product to which the device belongs. |
DeviceList | Array of device | The details of the devices returned. |
|
device | |||
DeviceName | String | light | The DeviceName of the device. Important
Keep the information confidential. |
DeviceSecret | String | b4d43f7******10ba5e5 | The DeviceSecret of the device. Important
Keep the information confidential. |
ProductKey | String | a1BwAGV**** | The ProductKey of the product to which the device belongs. |
Sn | String | QC4******001 | The serial number (SN) of the device. Note If you do not specify an SN for the device, this parameter is empty. |
Code | String | iot.system.SystemException | The error code returned if the call fails. For more information about error codes, see Error codes. |
ErrorMessage | String | A system exception occurred. | The error message returned if the call fails. |
Success | Boolean | true | Indicates whether the call was successful. Valid values:
|
Examples
Sample requests
http(s)://iot.cn-shanghai.aliyuncs.com/?Action=QueryImportedDeviceByApplyId
&ApplyId=1295006
&PageNo=1
&PageSize=10
&IotInstanceId=iot-1n8t****
&<Common request parameters>
Sample success responses
XML
format
<QueryImportedDeviceByApplyIdResponse>
<TotalPage>100</TotalPage>
<PageSize>10</PageSize>
<PageNo>1</PageNo>
<RequestId>E4C0FF92-2A86-41DB-92D3-73B60310D25E</RequestId>
<ProductKey>a1BwAGV****</ProductKey>
<DeviceList>
<device>
<DeviceSecret>b4d43f7******10ba5e5</DeviceSecret>
<Sn>QC4******001</Sn>
<ProductKey>a1BwAGV****</ProductKey>
<DeviceName>light</DeviceName>
</device>
</DeviceList>
<Success>true</Success>
</QueryImportedDeviceByApplyIdResponse>
JSON
format
{
"TotalPage": 100,
"PageSize": 10,
"PageNo": 1,
"RequestId": "E4C0FF92-2A86-41DB-92D3-73B60310D25E",
"ProductKey": "a1BwAGV****",
"DeviceList": {
"device": {
"DeviceSecret": "b4d43f7******10ba5e5",
"Sn": "QC4******001",
"ProductKey": "a1BwAGV****",
"DeviceName": "light"
}
},
"Success": true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
200 | iot.device.DeviceApplyIsNotFound | The application ID for the device does not exist. | The error message returned because the application ID does not exist. |
For a list of error codes, see Service error codes.