Queries distributed devices.

Usage notes

  • This operation can be called only by using the following endpoint: iot.cn-shanghai.aliyuncs.com.
  • Each Alibaba Cloud account can run a maximum of 5 queries per second (QPS).
    Note RAM users of an Alibaba Cloud account share the quota of the account.
  • Multiple Alibaba Cloud accounts can run a maximum of 200 QPS at the same time.

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 ListDistributedDevice

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

CurrentPage Integer Yes 1

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

PageSize Integer Yes 5

The number of entries to return on each page. Maximum value: 200.

ProductKey String No a1BwAGV****

The ProductKey of the product to which the device belongs.

DeviceName String No mydevice

The name of the device.

TargetUid String No 198***

The ID of the Alibaba Cloud account. You can log on to the IoT Platform console, click the profile picture, and then view the account ID on the Security Settings page.

SourceInstanceId String No iot-060***

The ID of the source instance to which the device belongs.

  • The IDs of public instances in different regions:
    • China (Shanghai): iotx-oxssharez200.
    • Japan (Tokyo): iotx-oxssharez300.
    • Singapore (Singapore): iotx-oxssharez400.
    • US (Silicon Valley): iotx-oxssharez500.
    • US (Virginia): iotx-oxssharez600.
    • Germany (Frankfurt): iotx-oxssharez700.
  • The IDs of Enterprise Edition instances:

    1. Log on to the IoT Platform console. Select a region from the drop-down list in the upper-left corner of the top navigation bar.

    2. On the Overview page, click the instance name. On the Instance Details page, view the instance ID in the Basic Information section.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information about common request parameters, see Common 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 Struct

The products returned if the call is successful. For more information, see Info.

Info Array of items

The information about the device.

items
DeviceName String mydevice

The name of the device.

GmtCreate Long 1581595942000

The time when the distribution task was created.

GmtModified Long 1581595942222

The time when the distribution task was modified.

ProductKey String a1BwAGV***

The ProductKey of the product to which the device belongs.

SourceInstanceId String iot-cn-6ja***

The ID of the source instance.

SourceInstanceName String myproInstance

The name of the source instance.

SourceRegion String cn-shanghai

The source region to which the device belongs.

SourceUid String 198***

The ID of the Alibaba Cloud account that distributes the device.

You can only distribute products across regions and instances by using the same Alibaba cloud account. The value of this parameter is the same as the value of the TargetUid parameter.

TargetAliyunId String io****@example.com

The Alibaba Cloud account to which the device is distributed.

TargetInstanceId String iot-cn-09k***

The ID of the destination instance.

TargetInstanceName String newinstance

The name of the destination instance.

TargetRegion String cn-shenzhen

The destination region to which the device is distributed.

TargetUid String 198***

The Alibaba Cloud account to which the device is distributed.

You can only distribute products across regions and instances by using the same Alibaba cloud account. The value of this parameter is the same as the value of the SourceUid parameter.

Total Integer 10

The total number of returned devices.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

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.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/? Action=ListDistributedDevice
&CurrentPage=1
&PageSize=5
&TargetUid=198***
&<Common request parameters>

Sample success responses

XML format

<ListDistributedDeviceResponse>
  <RequestId>E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565</RequestId>
  <Data>
        <Total>10</Total>
        <Info>
              <items>
                    <TargetRegion>cn-shenzhen</TargetRegion>
                    <SourceInstanceName>myproInstance</SourceInstanceName>
                    <TargetAliyunId>io****@example.com</TargetAliyunId>
                    <SourceUid>198***</SourceUid>
                    <GmtModified>1581595942222</GmtModified>
                    <TargetInstanceId>iot-cn-09k***</TargetInstanceId>
                    <TargetUid>198***</TargetUid>
                    <SourceRegion>cn-shanghai</SourceRegion>
                    <SourceInstanceId>iot-cn-6ja***</SourceInstanceId>
                    <GmtCreate>1581595942000</GmtCreate>
                    <TargetInstanceName>newinstance</TargetInstanceName>
                    <ProductKey>a1BwAGV***</ProductKey>
                    <DeviceName>mydevice</DeviceName>
              </items>
        </Info>
  </Data>
  <Success>true</Success>
</ListDistributedDeviceResponse>

JSON format

{
    "RequestId": "E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565",
    "Data": {
        "Total": "10",
        "Info": {
            "items": [{
                "TargetRegion": "cn-shenzhen",
                "SourceInstanceName": "myproInstance",
                "TargetAliyunId": "io****@example.com",
                "SourceUid": "198***",
                "GmtModified": "1581595942222",
                "TargetInstanceId": "iot-cn-09k***",
                "TargetUid": "198***",
                "SourceRegion": "cn-shanghai",
                "SourceInstanceId": "iot-cn-6ja***",
                "GmtCreate": "1581595942000",
                "TargetInstanceName": "newinstance",
                "ProductKey": "a1BwAGV***",
                "DeviceName": "mydevice"
            }]
        }
    },
    "Success": "true"
}

Error codes

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