Bulk Device Creation

In order to provision a set of devices in bulk, EdgeIQ has a few methods for creating a number of devices in the system at once. The most flexible and programmatic way to create multiple devices is through the API, but CSV functionality is available as well.

Bulk Create API Endpoints

  • POST /devices/bulk : Using this request, you provide what is essentially a device template along with a list of unique device identifiers (see Bulk Device API documentation).

  • POST /device_templates/{device_template_id}/bulk_create: Bulk create devices for the given array of unique device identifiers based on the referenced Device Template (see Bulk Device API documentation).

  • Bulk creates are limited to 1000 records at a time. To create more, split your requests over multiple bulk creates

NOTE: Bulk API requests will return a Bulk Response ID which can be used to monitor the status of the Bulk Create request using the GET /bulk_responses/{bulk_response_id} request, see the Bulk Devices API documentation for more information.

CSV Upload

It's also possible to define a set of devices to be created using a CSV file. This file can be uploaded via the /devices/csv_bulk_upload endpoint. The endpoint will process 1000 rows at a time, so to upload more, break the devices into multiple files.

PositionFieldDescription
1NameDevice name
2Unique IDUnique identifier of device. Unique IDs must be globally unique. Please note that unique id is case sensitive, and unique ids for gateway type devices should be all lowercase if using the default auto discovered unique id (MAC address).
3Serial Number[Optional] An optional serial number for the device
4Location[Optional] A string describing the location of the device
5Company IDID of the company account for this device
6DeviceType IDThe ID of the device type for this device
7Heartbeat PeriodHeartbeat period in seconds
8Cellular Number[Optional] Cellular number associated with device
9SMS Command Password[Optional] Password for issuing commands via SMS
10DeviceConfig ID[Optional] ID of configuration to apply to these devices
11Active[Optional] true or false to mark the device active or inactive
12Heartbeat Values[Optional] A comma separated list of values to send along with heartbeat messages. Must be surrounded in quotes, e.g. "disk_size,disk_free"
13Device Integration ID[Optional] ID of a device integration to assign to the device
14Cloud Native Integration ID[Optional] ID of a cloud-native integration to assign to the device
15Parent Device ID[Optional] If the device is a sensor type device, or endpoint, the ID (not unique ID) of the parent device
16Tags[Optional] Semicolon delimited list of tags to apply to this device, e.g. tag 1;tag 2
17Metadata[Optional] Metadata to apply to this device. Semicolon delimited, colon separated key value pairs, e.g. Current Firmware:v1.5;Color:blue
18Delete?[Optional] In order to bulk delete, you may put true in this column. The device will be deleted

For a template, here is an example file to get you started.

See the Device API documentation for more information about the upload endpoint.


Did this page help you?