post
https://api.edgeiq.io/api/v1/platform/devices/csv_bulk_upload
Bulk Create/Edit/Delete devices via CSV file.
CSV Format
The CSV file must have exactly 21 columns in the following order:
| # | Column Name | Required (Create) | Required (Update/Delete) | Format |
|---|---|---|---|---|
| 1 | Device Name | Yes | No | Text |
| 2 | Device Unique ID | Yes | Yes | Text (MAC address format recommended) |
| 3 | Serial Number | No | No | Text |
| 4 | Location | No | No | Text |
| 5 | Account ID | Yes | Yes | Valid Account/Company ID |
| 6 | Device Type ID | Yes | No | Valid Device Type ID |
| 7 | Heartbeat Period (second) | Yes | No | Integer >= 0 (0 means not set) |
| 8 | Device Cell Number | No | No | Text |
| 9 | SMS Command Password | No | No | Text |
| 10 | Device Config ID | No | No | Device Config ID or name |
| 11 | Active | No | No | true, false, or empty (default: true) |
| 12 | Heartbeat Values | No | No | Comma-separated values |
| 13 | Device Integration ID | No | No | Valid Integration ID |
| 14 | Cloud Native Integration ID | No | No | Valid Cloud Native Integration ID |
| 15 | Parent Device ID | No | No | Valid Device ID (for attached endpoints) |
| 16 | Tags | No | No | Semicolon-separated tags (e.g., tag1;tag2) |
| 17 | Metadata | No | No | Semicolon-separated key:value pairs (e.g., key1:value1;key2:value2) |
| 18 | Enforce Secure MQTT | No | No | true, false, or empty |
| 19 | MQTT Password | No | No | Text (leave blank for default) |
| 20 | Delete? | No | No | true to delete device, false or empty otherwise |
| 21 | Update? | No | No | true to update device, false or empty otherwise |
Operation Types
- Create: When both Delete and Update columns are
falseor empty - Update: When Update column is
true - Delete: When Delete column is
true
Note: Delete and Update cannot both be true for the same row.
Validation Rules
- Heartbeat Period: Must be an integer >= 0. Negative values are not allowed. Value of 0 is treated as "not set".
- Boolean fields (Active, Enforce Secure MQTT, Delete, Update): Must be
true,false, or empty. - Metadata: Must be in format
key:valuepairs separated by semicolons. - Tags: Semicolon-separated list of tag names.
Update Behavior
When updating devices, the following fields are replaced (not merged):
- Tags: The entire tags list is replaced with the values from the CSV. To add a new tag while keeping existing ones, include all existing tags plus the new one in the CSV.
- Metadata: The entire metadata object is replaced with the values from the CSV. To add a new key while keeping existing ones, include all existing key:value pairs plus the new one in the CSV.
If these columns are left empty during an update, the existing values are preserved.
Limits
- Maximum 1000 devices per upload