Skip to content

Bulk-create devices

POST
/api/devices/bulk
curl --request POST \
--url http://localhost:3000/api/devices/bulk \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "items": [ {} ], "materialisePorts": true }'

Importer path (CSV / NetBox migration). Max 2000 items. Skips per-row FK existence checks (the DB enforces them) and rack-slot collision checks; items without a name are skipped and reported.

Media type application/json
object
items
required
Array<object>
<= 2000 items

Same shape as the single-device create body

object
materialisePorts

Auto-create ports from device-type templates

boolean
default: true

Bulk insert report

Media type application/json
object
data
Array<object>
object
id
required
string format: uuid
name
required
string
status
required
string
Allowed values: active planned staged offline decommissioned
siteId
string format: uuid
nullable
locationId
string format: uuid
nullable
rackId
string format: uuid
nullable
manufacturerId
string format: uuid
nullable
deviceRoleId
string format: uuid
nullable
deviceTypeId
string format: uuid
nullable
platformId
string format: uuid
nullable
position

Lowest occupied rack unit

integer
nullable
uHeight

Rack units occupied

integer
default: 1
platform

Legacy free-text platform (prefer platformId)

string
nullable
model

Legacy free-text model (prefer deviceTypeId)

string
nullable
primaryIp
string
nullable
description
string
nullable
tags
Array<string>
serialNumber
string
nullable
assetTag
string
nullable
notes
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
requested
required
integer
inserted
required
integer
ports

Ports templated from device types

integer
skipped
required
Array<object>
object
index
integer
reason
string
Example
{
"data": [
{
"status": "active",
"uHeight": 1
}
]
}

Items must be an array of at most 2000 entries

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}