Queries the information of multiple devices that you have registered.

Limits

Each Alibaba Cloud account can run a maximum of 50 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 QueryPageByApplyId

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

ApplyId Long Yes 1295006

The ID of the application. You can view the application ID in the response of the BatchRegisterDeviceWithApplyId or BatchRegisterDevice operation.

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 entries to return on each page. Maximum value: 50. Default value: 10.

CurrentPage Integer No 1

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

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
ApplyDeviceList Array of ApplyDeviceInfo

The registered device list information returned if the call succeeds. The ApplyDeviceInfo parameter includes the details of the registered devices.

ApplyDeviceInfo
DeviceId String gQG2GJ2y10m6hIk8****

The ID of the device (expired).

Note This parameter is no longer used. Do not use this parameter to identify a device. You can use the IotId parameter or a combination of the ProductKey and DeviceName parameters to identify a device.
DeviceName String light

The DeviceName of the device.

DeviceSecret String SkfeXXKrTgp1DbDxYr74mfJ5cnui****

The DeviceSecret of the device.

IotId String vWxNur6BUApsqjv9****000100

The ID of the device. The ID is the unique identifier that is issued by IoT Platform to the device.

Code String iot.system.SystemException

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

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

Page Integer 1

The page 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 E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

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 2

The total number of devices.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryPageByApplyId
&ApplyId=1234567
&PageSize=10
&CurrentPage=1
&<Common request parameters>

Sample success responses

XML format

<QueryPageByApplyIdResponse>
  <PageCount>1</PageCount>
  <ApplyDeviceList>
        <ApplyDeviceInfo>
              <DeviceId>vWxNur6BUApsqjv9****</DeviceId>
              <DeviceName>APItest</DeviceName>
              <DeviceSecret>tXXEtily4XuV7WS1fosJoDkhRIIU****</DeviceSecret>
              <IotId>vWxNur6BUApsqjv****4000100</IotId>
        </ApplyDeviceInfo>
        <ApplyDeviceInfo>
              <DeviceId>hoiwszKPYmHk074H****</DeviceId>
              <DeviceName>awfg</DeviceName>
              <DeviceSecret>BYpg1b2nmuq21BO7fxOogYQQZd9z****</DeviceSecret>
              <IotId>hoiwszKPYmHk074HA****000100</IotId>
        </ApplyDeviceInfo>
  </ApplyDeviceList>
  <Page>1</Page>
  <PageSize>10</PageSize>
  <RequestId>762F7AAD-8B87-4C65-BBF3-4575B002B384</RequestId>
  <Success>true</Success>
  <Total>2</Total>
</QueryPageByApplyIdResponse>

JSON format

{
    "PageCount": 1,
    "ApplyDeviceList": {
        "ApplyDeviceInfo": [
            {
                "DeviceId": "vWxNur6BUApsqjv9****",
                "DeviceName": "APItest",
                "DeviceSecret": "tXXEtily4XuV7WS1fosJoDkhRIIU****",
                "IotId": "vWxNur6BUApsqjv****4000100"
            },
            {
                "DeviceId": "hoiwszKPYmHk074H****",
                "DeviceName": "awfg",
                "DeviceSecret": "BYpg1b2nmuq21BO7fxOogYQQZd9z****",
                "IotId": "hoiwszKPYmHk074HA****000100"
            }
        ]
    },
    "Page": 1,
    "PageSize": 10,
    "RequestId": "762F7AAD-8B87-4C65-BBF3-4575B002B384",
    "Success": true,
    "Total": 2
}

Error codes

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