Call this operation to query the information of the devices that you have registered in a batch.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
Action | String | Yes | The operation that you want to perform. Set the value to QueryPageByApplyId. |
ApplyId | Long | Yes | The application ID of the request for registering devices. You obtain the application ID in the returned results of BatchRegisterDeviceWithApplyId and BatchRegisterDevice. |
PageSize | Integer | Yes | The number of devices per page in the response. The maximum limit is 50. |
CurrentPage | Integer | Yes | Specify from which page the returned results is to be displayed. |
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 | The error code returned when the call fails. For more information about error codes, see Error codes. |
PageCount | Integer | The total number of pages. |
PageSize | Integer | The number of devices displayed per page. |
Page | Integer | The current page number. |
Total | Integer | The total number of devices. |
ApplyDeviceList | ApplyDeviceInfo | The list of device information. For more information, see the following table. |
Parameter | Type | Description |
---|---|---|
DeviceId | String | The device ID (only available for the old edition of IoT Platform).
Note This is a legacy parameter that cannot be used to identify a device now. If you want to query the IotId (the GUID of the device), call
QueryDeviceDetail and specify
ProductKey and
DeviceName to view IotId in the results. The
DeviceName value can be viewed in the response of this API and in the IoT Platform console.
|
DeviceName | String | The device name. |
DeviceSecret | String | The device key.
Note Keep this information confidential.
|
Examples
Request example
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryPageByApplyId
&ApplyId=4416
&PageSize=10
&CurrentPage=1
&<Public Request Parameters>
Response sample
{
"RequestId":"BB71E443-4447-4024-A000-EDE09922891E",
"Success":true,
Page:1,
PageSize:10,
PageCount:1,
Total:4,
ApplyDeviceList:{
ApplyDeviceInfo:[
{DeviceId:abcdef1234*************,DeviceName:device1,DeviceSecret:abcdefsddd},
{DeviceId:edcba4321**************,DeviceName:device2,DeviceSecret:daffdfdeaa}
]
}
}