Call this operation to register multiple devices by using an application ID (ApplyId).

Restrictions and guidelines

You must use this operation with the BatchCheckDeviceNames operation to register multiple devices with specified names.

Use the following registration procedure:

  1. Call BatchCheckDeviceNames to set the names of devices that you want to register. IoT Platform verifies the device names that you submitted and returns an application ID (ApplyId).
  2. Call QueryBatchRegisterDeviceStatus to query the setting result of the device names.
  3. Call BatchRegisterDeviceWithApplyId to register multiple devices. The success result returned by this operation only indicates that the registration application has been submitted. The actual registration process takes a small period of time.
  4. (Optional.) Call QueryBatchRegisterDeviceStatus to query the device registration result.
  5. Call QueryPageByApplyId to query information about the registered devices.
Note Call BatchRegisterDevice if you want to register multiple devices without naming them. The system automatically generates the names.

Request parameters

Parameter Type Required Description
Action String  Yes The operation that you want to perform. Set the value to BatchRegisterDeviceWithApplyId.
ProductKey String Yes The identifier of the product under which the devices are registered.
ApplyId Long Yes The application ID for the devices to be registered. The application ID is returned by calling the BatchCheckDeviceNames operation.
Common request parameters N/A Yes See Common parameters.

Response parameters

Parameter Type Description
RequestId String The globally unique ID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String  The error message returned when the call fails.
Code String The error code returned when the call fails. For more information about error codes, see Error codes.
Data Data The data returned when the call is successful. For more information, see the following table: Parameters in Data.
Table 1. Parameters in Data
Parameter Type Description
ApplyId Long The application ID for this registration request.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=BatchRegisterDeviceWithApplyId
&ProductKey=al*********
&ApplyId=4416
&Common request parameters

Sample responses

  • JSON format

    {
      "RequestId":"57b144cf-09fc-4916-a272-a62902d5b207",
      "Success": true,
      "Data": {
        "ApplyId": 4416
      }
    }
    
  • XML format

    <? xml version='1.0' encoding='utf-8'? >
    <BatchRegisterDeviceWithApplyId> 
        <RequestId>57b144cf-09fc-4916-a272-a62902d5b207</RequestId> 
        <Success>true</Success> 
        <Data> 
            <ApplyId>4416</ApplyId> 
        </Data> 
    </BatchRegisterDeviceWithApplyId>