Skip to main content
POST
Create device role

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

Serializer for DeviceRole model.

name
string
required
Maximum string length: 255
slug
string
required
Maximum string length: 50
Pattern: ^[-a-zA-Z0-9_]+$
device_class
enum<string>
required
  • gpu_compute - GPU Compute
  • cpu_hypervisor - CPU Hypervisor
  • cpu_baremetal - CPU Baremetal
  • switch - Switch
Available options:
gpu_compute,
cpu_hypervisor,
cpu_baremetal,
switch
organisation
string<uuid>
required
annotations
object

Key-value annotations. Keys must start with a lowercase letter and contain only lowercase alphanumeric segments joined by hyphens or underscores (e.g. 'org-id', 'gpu_ready').

tags
string[]

Tags for the resource. Must start with a lowercase letter and contain only lowercase alphanumeric segments joined by hyphens or underscores (e.g. 'gpu-ready', 'needs_review'). Stored deduplicated and sorted.

Response

Serializer for DeviceRole model.

id
string<uuid>
required
read-only
organisation_name
string
required
read-only

Serializer for device role links.

created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
name
string
required
Maximum string length: 255
slug
string
required
Maximum string length: 50
Pattern: ^[-a-zA-Z0-9_]+$
device_class
enum<string>
required
  • gpu_compute - GPU Compute
  • cpu_hypervisor - CPU Hypervisor
  • cpu_baremetal - CPU Baremetal
  • switch - Switch
Available options:
gpu_compute,
cpu_hypervisor,
cpu_baremetal,
switch
organisation
string<uuid>
required
annotations
object

Key-value annotations. Keys must start with a lowercase letter and contain only lowercase alphanumeric segments joined by hyphens or underscores (e.g. 'org-id', 'gpu_ready').

tags
string[]

Tags for the resource. Must start with a lowercase letter and contain only lowercase alphanumeric segments joined by hyphens or underscores (e.g. 'gpu-ready', 'needs_review'). Stored deduplicated and sorted.