Skip to content

Update device

PATCH
/api/v1/devices/{id}
curl --request PATCH \
--url http://localhost:3000/api/v1/devices/550e8400-e29b-41d4-a716-446655440000 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "Production Edge Gateway 1", "labels": { "environment": "production", "region": "us-west", "tier": "edge" } }'

Updates device properties such as name and labels.

id
required
string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000

Device UUID

Media type application/json
object
name

Human-readable device name

string
<= 255 characters
Example
Production Edge Gateway 1
labels

Key-value labels for device organization and filtering

object
key
additional properties
string
Example
{
"environment": "production",
"region": "us-west",
"tier": "edge"
}

Device updated successfully

Media type application/json
object
id
required

Unique device identifier (UUID)

string format: uuid
clientId
required

Client-provided device identifier

string
name

Human-readable device name

string
status
required

Current device status

string
Allowed values: ONLINE OFFLINE PENDING ERROR
capabilities
required

Device capabilities as reported during onboarding

object
key
additional properties
any
labels
required

Key-value labels for device organization and filtering

object
key
additional properties
string
lastSeenAt

Timestamp of last communication from device

string format: date-time
createdAt
required

Timestamp when device was registered

string format: date-time
updatedAt
required

Timestamp of last device update

string format: date-time
Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"clientId": "edge-device-001",
"name": "Production Edge Gateway 1",
"status": "ONLINE",
"capabilities": {
"cpu": {
"cores": 4,
"architecture": "arm64"
},
"memory": {
"total": 8192
},
"containers": {
"runtime": "containerd"
}
},
"labels": {
"environment": "production",
"region": "us-west",
"tier": "edge"
},
"lastSeenAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}

Bad Request - Invalid input data

Unauthorized - Invalid or missing authentication

Forbidden - Insufficient permissions

Device not found