Skip to content

Create device role

POST
/api/device-roles
curl --request POST \
--url http://localhost:3000/api/device-roles \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "name": "example", "slug": "example", "color": "#4F6EF7", "description": "example", "tier": "access", "redundancy": "optional", "complianceBaselines": [ "example" ], "vmRole": false, "typicalLocation": "example", "responsibilities": "example", "popular": false }'
Media type application/json
object
name
required
string
slug

Auto-generated from name when omitted

string
color
string
default: #4F6EF7
description
string
tier
string
Allowed values: access distribution core spine leaf border-leaf ai-fabric edge sp-edge sp-core customer-edge branch security wireless storage compute mgmt optical dci passive monitoring
redundancy
string
Allowed values: optional recommended required
complianceBaselines
Array<string>
vmRole
boolean
typicalLocation
string
responsibilities
string
popular
boolean

DeviceRole created

Media type application/json
object
data
object
id
required
string format: uuid
name
required
string
slug
string
nullable
color
string
nullable
description
string
nullable
tier
string
nullable
redundancy
string
nullable
complianceBaselines
Array<string>
vmRole
boolean
typicalLocation
string
nullable
responsibilities
string
nullable
popular
boolean
source
string
Allowed values: vendor customer
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"data": {
"source": "vendor"
}
}

Validation error

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