Queries the processing status and result of device registration for multiple devices.

Limits

Each Alibaba Cloud account can run a maximum of 30 queries per second (QPS).

Note RAM users of an Alibaba Cloud account share the quota of the account.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. 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 QueryBatchRegisterDeviceStatus

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

ApplyId Long Yes 1295006

The ID of the application. The application ID is in the result of BatchRegisterDeviceWithApplyId or BatchRegisterDevice when they are successfully called.

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 instance ID on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

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 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 devices do not reside in the China (Shanghai) region, you cannot generate X.509 certificates for these devices and the iot.device.RegionNotSupportX509 error code is returned.
Data Struct

The status information returned if the call is successful.

InvalidList List { "Name": [] }
  • If the value of the Status parameter is CHECK_FAILED or CREATE_FAILED, the DeviceNames of the devices that fail to be created are returned.
  • If the value of the Status parameter is CHECK_SUCCESS or CREATE_SUCCESS, this parameter includes an empty array.
Status String CREATE_SUCCESS

The processing status and result. Valid values:

  • CHECK: The system is verifying DeviceNames.
  • CHECK_SUCCESS: All devices in the application form are verified.
  • CHECK_FAILED: All devices in the application form fail 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 certificate, all devices are created along with the related X.509 certificates.
  • CREATE_FAILED: All devices in the application form fail to be created.
    Note If a device or X.509 certificate fails to be created in the current batch when the authentication type is X.509 certificate, all devices fail to be created.
ValidList List { "Name": [] }
  • If the value of the Status parameter is CHECK_SUCCESS or CREATE_SUCCESS, the DeviceNames of the created devices are returned.
  • If the value of the Status parameter is CHECK_FAILED or CREATE_FAILED, this parameter includes an empty array.
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

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryBatchRegisterDeviceStatus
&ProductKey=a1BwAGV****
&ApplyId=1234567
&<Common request parameters>

Sample success responses

XML format

<QueryBatchCheckDeviceNamesStatusResponse>
  <Data>
        <Status>CREATE_SUCCESS</Status>
        <ValidList></ValidList>
        <InvalidList></InvalidList>
  </Data>
  <RequestId>F731C7F3-A86C-4039-9FCA-5F802F3C59A1</RequestId>
  <Success>true</Success>
</QueryBatchCheckDeviceNamesStatusResponse>

JSON format

{
    "Data": {
        "Status": "CREATE_SUCCESS",
        "ValidList": {
            "Name": []
        },
        "InvalidList": {
            "Name": []
        }
    },
    "RequestId": "F731C7F3-A86C-4039-9FCA-5F802F3C59A1",
    "Success": true
}

Error codes

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