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.

Note The 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

ParameterTypeRequiredExampleDescription
ActionStringYesQueryBatchRegisterDeviceStatus

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

ApplyIdLongYes1295006

The application ID.

If the call for the BatchRegisterDeviceWithApplyId or BatchRegisterDevice operation is successful, the application ID is returned.

ProductKeyStringYesa1BwAGV****

The ProductKey of the product to which the device belongs.

IotInstanceIdStringNoiot_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
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.
  • If no Overview page or ID is generated for your instance, you do not need to configure this parameter.

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

ParameterTypeExampleDescription
CodeStringiot.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.
DataStruct

The status information returned if the call is successful.

InvalidDetailListArray of invalidDetailList
  • If the return value of the Status parameter is CHECK_FAILED or CREATE_FAILED, some devices failed to be created. The details of the devices that failed to be created are returned by the InvalidDetailList parameter.
  • If the return value of the Status parameter is CHECK_SUCCESS or CREATE_SUCCESS, all devices are created. In this case, no details of failed devices need to be returned, and the return value of the InvalidDetailList parameter is an empty array.
invalidDetailList
DeviceNameStringlight

The DeviceName of the device.

ErrorMsgStringThe nick name is illegal.

The error message returned if some devices failed to be created.

Note Multiple error messages are separated by vertical bars (|).
NickNameStringCampus light-1

The alias of the device.

InvalidListList{ "Name": ["Elec_instrument"] }
  • If the return value of the Status parameter is CHECK_FAILED or CREATE_FAILED, some devices failed to be created. The DeviceNames of the devices that failed to be created are returned by the InvalidList parameter.
  • If the return value of the Status parameter is CHECK_SUCCESS or CREATE_SUCCESS, all devices are created. In this case, no DeviceNames need to be returned, and the return value of the InvalidList parameter is an empty array.
StatusStringCREATE_SUCCESS

The processing status and result. Valid values:

  • CHECK: The system is verifying device names.
  • CHECK_SUCCESS: All devices in the application form are verified.
  • CHECK_FAILED: All devices in the application form failed to be verified.
  • CREATE: The system is creating devices.
  • CREATE_SUCCESS: All devices in the application form are created.
    Note If the authentication type of the product to which the devices belong is X.509, all devices and the related X.509 certificates are created.
  • CREATE_FAILED: Some devices in the application form failed to be created.
    Note If a device or an X.509 certificate fails to be created in the current batch when the authentication type is X.509, all devices fail to be created.
ValidListList{ "Name": ["light3"] }
  • If the value of the Status parameter is CHECK_FAILED or CREATE_FAILED, some devices failed to be created. The DeviceNames of the devices that are created are returned by the ValidList parameter.
  • If the value of the Status parameter is CHECK_SUCCESS or CREATE_SUCCESS, all devices are created. In this case, no DeviceNames need to be returned, and the return value of the ValidList parameter is an empty array.
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. Valid values:

  • true: The call was successful.
  • false: The call failed.

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.