Call this operation to customize multiple device names under the specified product. IoT Platform will check the validity of these names.

Restrictions and guidelines

  • You can specify up to 1,000 device names in a single call.

  • You must use this operation with the BatchRegisterDeviceWithApplyId operation to register multiple devices with unique names under a product.

    Use the following registration procedure:

    1. Call this operation to specify the names of the devices to be registered. IoT Platform returns the application ID (ApplyId). A successful result is returned, indicating that the application for device name verification has been submitted. The actual verification is performed asynchronously and takes a small period of time.
    2. Call QueryBatchRegisterDeviceStatus to query the name setting result.
    3. Call BatchRegisterDeviceWithApplyId to register multiple devices.
    4. (Optional.) Call QueryBatchRegisterDeviceStatus to query the device registration result.
    5. Call QueryPageByApplyId to query the information about the registered devices.

Request parameters

Parameter Type Required Description
Action String Yes The operation you want to perform. Set the value to BatchCheckDeviceNames.
ProductKey String Yes The identifier of the product under which the devices are registered.
DeviceName List<String> Yes

The name list of the devices to be registered. Each device name must be 4 to 32 characters in length and can contain letters, numbers, and special characters. The special characters include hyphens (-), underscores (_), at signs (@), periods (.), and colons (:).

Note You can specify up to 1,000 device names in a single call.
Common request parameters N/A Yes See Common parameters.

Response parameters

Parameter Type Description
RequestId String The GUID 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 (ApplyId) returned for the request when the call is successful. When you call BatchRegisterDeviceWithApplyId to register the devices, the ApplyId is required.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=BatchCheckDeviceNames
&productKey=al**********
&DeviceName. 1=device1
&DeviceName. 3=device2
&DeviceName. 2=device3
&DeviceName. 4=device4
&Common request parameters

Sample responses

  • JSON format

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

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