You can use the Package Management CLI tool to register multiple devices to VMware Pulse IoT Center using the Basic, Property-Based, TPM-Based, and Token-Based enrollment types.

Prerequisites

Ensure that you create a JSON file with the device template name, list of devices, their credentials, and properties, in the following format:
{
   "templateName": "property-template",
   "devices": [{
         "name": "Agent_x86_2",
         "credential": [{
            "key": "Serial Number",
            "value": "abc-56 4d fa a4 78 fa f2 88-24 3a 14 11 7d bd b8 b6"
         }],
         "property": [{
            "name": "model",
            "value": "xx 5K"
         }, {
            "name": "color",
            "value": "white"
         }]
      },
      {
         "name": "Agent_x86_3",
         "credential": [{
            "key": "Serial Number",
            "value": "abc-56 4d 13 fb cc 73 82 2e-08 5d b1 c1 38 bf 1d 23"
         }],
         "property": [{
            "name": "model",
            "value": "xyi3b"
         }]
      }
   ]
} 

The Package Management CLI tool uses this JSON file to read the devices list and register them to VMware Pulse IoT Center.

Procedure

  1. Download the Package Management CLI tool to your system. The Package Management CLI tool contains the following set of device commands that enable you to register your devices in bulk:
    a01:iot-cli xyz$ ./bin/darwin_amd64/package-cli devices
    Manage devices on Pulse IoT Center
    Usage:
      package-cli devices [command]
     
    Available Commands:
      register     Register device by given name on Pulse IoT Center
      register-all Register multiple devices to Pulse IoT Center. Expects JSON file with device details.
      search       Search given device by name on Pulse IoT Center
     
    Flags:
      -v, --api-version string     Pulse API version to use (default "1.0")
      -h, --help                   help for devices
      -s, --host-name string       Pulse IoT Center instance hostname <Required>
      -i, --insecure               Skip SSL certificate verification
      -l, --log-file-path string   Log file path (default "./iot-cli.log")
     
    Use "package-cli devices [command] --help" for more information about a command.
  2. Run the register-all command with the path to the JSON file that you created.
    a01:iot-cli xyz$ ./package-cli devices register-all ./example-iotc-package/device-regd-property-based.json -s https://10.92.85.41 -i
    Username: sysadmin
    Password:
    Authentication successful.
    Registering device...
    Device registered with id: 30d75156-65b7-4658-b1e1-e7fba5008122 name: Agent_x86_2
    Updating device property...
    Property update successful for device
    Creating device credentials...
    Device credential successfully created for device
    Registering device...
    Device registered with id: a8f2dddb-8631-4d02-bfcd-b77febbf3a56 name: Agent_x86_3
    Updating device property...
    Property update successful for device
    Creating device credentials...
    Device credential successfully created for device
     
    Successfully registered devices: 2
    Total devices: 2

Results

The registered devices are listed in the Inventory - Devices page of the VMware Pulse IoT Center console UI.