Skip to content

Bulk-create device ports

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

Max 5000 items. Each item additionally needs a deviceId. Conflicts on (deviceId, name) are skipped silently; items missing deviceId or name are skipped and reported.

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

Port create body plus required deviceId

object
Example generated
{
"items": [
{}
]
}

Bulk insert report

Media type application/json
object
data
Array<object>
object
id
required
string format: uuid
deviceId
required
string format: uuid
name
required
string
portType
required
string
default: 1000base-t
status
required
string
Allowed values: enabled disabled planned
linkStatus
required
string
Allowed values: up down unknown
peer
string
nullable
vlan
string
nullable
lldp
string
nullable
errs
integer
description
string
nullable
portGroupLabel
string
nullable
portIndex
integer
nullable
connectorType
string
nullable
speeds
Array<string>
poeStandard
string
nullable
poeWatts
integer
nullable
transceiver
string
nullable
mgig
boolean
breakoutCapable
boolean
moduleSlot
string
nullable
macAddress
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
requested
required
integer
inserted
required
integer
skipped
required
Array<object>
object
index
integer
reason
string
Example
{
"data": [
{
"portType": "1000base-t",
"status": "enabled",
"linkStatus": "up"
}
]
}

Items must be an array of at most 5000 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"
}