Queries the ClientIDs of a device. This API operation applies to preregistration-free unique-certificate-per-product authentication.
Limits
Each Alibaba Cloud account can run a maximum of 10 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryClientIds |
The operation that you want to perform. Set the value to QueryClientIds. |
IotId | String | Yes | y4u2weAIrpp****WHMle1234 |
The ID of the device. You can call the QueryDeviceInfo operation to query the IotId parameter. |
IotInstanceId | String | No | iot-a****13l |
The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console. Notice
For more information, see Overview. |
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 |
---|---|---|---|
Code | String | Success |
The error code returned if the call fails. For more information, see Error codes. |
Data | Struct |
The ClientIDs returned if the call is successful. For more information, see DynamicRegClientIds. |
|
DynamicRegClientIds | Array of DynamicRegClientId |
The list of ClientIDs. |
|
ClientId | String | 9rSzYt4js92********f000112 |
The ClientID of the device. |
CreateTime | Long | 1636514022424 |
The time when the ClientID was created. |
IotId | String | y4u2weAI********HMle1234 |
The ID of the device. |
ErrorMessage | String | request parameter error |
The error message returned if the call fails. |
RequestId | String | 89F22330-BAEE-****-****-41BA46D6E267 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
http(s)://iot.cn-shanghai.aliyuncs.com/?Action=QueryClientIds
&IotId=y4u2weAIrpp****WHMle1234
&<Common request parameters>
Sample success responses
XML
format
<QueryClientIdsResponse>
<RequestId>CA991E7C-BDE7-5887-B3B7-E08C68C0D346</RequestId>
<Data>
<IotId>kRLP***0000</IotId>
<DynamicRegClientIds>
<CreateTime>1635847637823</CreateTime>
<ClientId>K19uYV***000100</ClientId>
</DynamicRegClientIds>
<DynamicRegClientIds>
<CreateTime>1635846982286</CreateTime>
<ClientId>bpQwyW***000100</ClientId>
</DynamicRegClientIds>
<DynamicRegClientIds>
<CreateTime>1635847426368</CreateTime>
<ClientId>ntnIvez***000100</ClientId>
</DynamicRegClientIds>
</Data>
<Success>true</Success>
</QueryClientIdsResponse>
JSON
format
{
"RequestId": "CA991E7C-BDE7-5887-B3B7-E08C68C0D346",
"Data": {
"IotId": "kRLP***0000",
"DynamicRegClientIds": [
{
"CreateTime": 1635847637823,
"ClientId": "K19uYV***000100"
},
{
"CreateTime": 1635846982286,
"ClientId": "bpQwyW***000100"
},
{
"CreateTime": 1635847426368,
"ClientId": "ntnIvez***000100"
}
]
},
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.