Skip to content

Create cable

POST
/api/cables
curl --request POST \
--url http://localhost:3000/api/cables \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "label": "example", "type": "cat5e", "status": "connected", "color": "example", "length": 1, "lengthUnit": "m", "aPortId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "bPortId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "description": "example" }'
Media type application/json
object
label
string
<= 120 characters
type
required
string
Allowed values: cat5e cat6 cat6a cat7 cat8 fiber-mm fiber-sm sfp qsfp dac aoc power usb serial other
status
string
default: connected
Allowed values: connected planned decommissioning
color
string
<= 32 characters
length
number
<= 100000
lengthUnit
string
Allowed values: m cm ft in
aPortId
required
string format: uuid
bPortId
required
string format: uuid
description
string

Cable created

Media type application/json
object
data
object
id
required
string format: uuid
label
string
nullable
type
required
string
Allowed values: cat5e cat6 cat6a cat7 cat8 fiber-mm fiber-sm sfp qsfp dac aoc power usb serial other
status
required
string
Allowed values: connected planned decommissioning
color
string
nullable
length

Numeric serialised as string

string
nullable
lengthUnit
string
nullable
Allowed values: m cm ft in
aPortId
required
string format: uuid
bPortId
required
string format: uuid
description
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"data": {
"type": "cat5e",
"status": "connected",
"lengthUnit": "m"
}
}

Validation error — A and B endpoints must reference different, existing ports

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"
}