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 Resource Access Management (RAM) users of an Alibaba Cloud account share the quota of the account.

Debugging

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 application ID. View the application ID in the result that is returned by the BatchRegisterDeviceWithApplyId or BatchRegisterDevice operation.

IotInstanceId String No iot_instc_pu****_c*-v64********

The instance ID. This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.

CurrentPage Integer No 1

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

PageSize Integer No 10

The number of entries to return on each page. Valid values: 1 to 50. Default value: 10.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this API 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 each device (expired).

Note This parameter is expired. 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 specify a valid device identifier.
DeviceName String light

The name of the device.

DeviceSecret String SkfeXXKrTgp1DbDxYr74mfJ5cnui****

The secret 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 returned.

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 succeeds.

  • true: The call succeeded.
  • 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.