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

ParameterTypeRequiredExampleDescription
ActionStringYesListDistributedDevice

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

CurrentPageIntegerYes1

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

PageSizeIntegerYes5

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

ProductKeyStringNoa1BwAGV****

The ProductKey of the product to which the device belongs.

DeviceNameStringNomydevice

The DeviceName of the device.

TargetUidStringNo198***

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

SourceInstanceIdStringNoiot-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, see Common request parameters.

Response parameters

ParameterTypeExampleDescription
CodeStringiot.system.SystemException

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

DataStruct

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

InfoArray of items

The information about the device.

items
DeviceNameStringmydevice

The DeviceName of the device.

GmtCreateLong1581595942000

The time when the distribution task was created.

GmtModifiedLong1581595942222

The time when the distribution task was modified.

ProductKeyStringa1BwAGV***

The ProductKey of the product to which the device belongs.

SourceInstanceIdStringiot-cn-6ja***

The ID of the source instance.

SourceInstanceNameStringmyproInstance

The name of the source instance.

SourceRegionStringcn-shanghai

The source region in which the device resides.

SourceUidString198***

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

You can only distribute devices 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.

TargetAliyunIdStringio****@example.com

The Alibaba Cloud account to which the device is distributed.

TargetInstanceIdStringiot-cn-09k***

The ID of the destination instance.

TargetInstanceNameStringnewinstance

The name of the destination instance.

TargetRegionStringcn-shenzhen

The destination region to which the device is distributed.

TargetUidString198***

The Alibaba Cloud account to which the device is distributed.

You can only distribute devices 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.

TotalInteger10

The total number of returned devices.

ErrorMessageStringA system exception occurred.

The error message returned if the call fails.

RequestIdStringE55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

The ID of the request.

SuccessBooleantrue

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.