Queries the processing status and result of device registration for multiple devices.
QPS limits
You can call this API operation up to 30 times per second per account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryBatchRegisterDeviceStatus | The operation that you want to perform. Set the value to QueryBatchRegisterDeviceStatus. |
ApplyId | Long | Yes | 1295006 | The application ID. If the call for the BatchRegisterDeviceWithApplyId or BatchRegisterDevice operation is successful, the application ID is returned. |
ProductKey | String | Yes | a1BwAGV**** | The ProductKey of the product to which the device belongs. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** | The ID of the instance. You can view the ID of the instance on the Overview page in the IoT Platform console. Important
For more information, see Overview. |
In addition to the preceding operation-specific request parameters, you must configure 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. Note X.509 certificates are available only for devices in the China (Shanghai) region. If your devices do not reside in the China (Shanghai) region, you cannot generate X.509 certificates for the devices and the iot.device.RegionNotSupportX509 error code is returned. |
Data | Struct | The status information returned if the call is successful. | |
InvalidDetailList | Array of invalidDetailList |
| |
invalidDetailList | |||
DeviceName | String | light | The DeviceName of the device. |
ErrorMsg | String | The nick name is illegal. | The error message returned if some devices failed to be created. Note Multiple error messages are separated by vertical bars (|). |
NickName | String | Campus light-1 | The alias of the device. |
InvalidList | List | { "Name": ["Elec_instrument"] } |
|
Status | String | CREATE_SUCCESS | The processing status and result. Valid values:
|
ValidList | List | { "Name": ["light3"] } |
|
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. Valid values:
|
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryBatchRegisterDeviceStatus
&ProductKey=a1BwAGV****
&ApplyId=1234567
&<Common request parameters>
Sample success responses
XML
format
<QueryBatchCheckDeviceNamesStatusResponse>
<RequestId>E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565</RequestId>
<Data>
<Status>CREATE_SUCCESS</Status>
<InvalidDetailList>
<invalidDetailList>
<ErrorMsg>The nick name is illegal. | The nick name is illegal.</ErrorMsg>
<NickName>Campus light-1</NickName>
<DeviceName>Elec_instrument</DeviceName>
</invalidDetailList>
</InvalidDetailList>
<ValidList>
<Name>light3</Name>
</ValidList>
<InvalidList>
<Name>Elec_instrument</Name>
</InvalidList>
</Data>
<Code></Code>
<Success>true</Success>
</QueryBatchCheckDeviceNamesStatusResponse>
JSON
format
{
"RequestId": "E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565",
"Data": {
"Status": "CREATE_SUCCESS",
"InvalidDetailList": {
"invalidDetailList": [{
"ErrorMsg": "The nick name is illegal. | The nick name is illegal.",
"NickName": "Campus light-1",
"DeviceName": "Elec_instrument"
}]
},
"ValidList": {
"Name": ["light3"]
},
"InvalidList": {
"Name": ["Elec_instrument"]
}
},
"Code": "",
"Success": true
}
Error codes
For a list of error codes, see Service error codes.