Skip to content

Devices API

Base URL: https://app.kvmfleet.io/v1

List devices

curl https://app.kvmfleet.io/v1/devices \
  -H "Authorization: Bearer $TOKEN"
{
  "devices": [
    {
      "id": "dev_abc123",
      "name": "DC1-R3-S7",
      "tags": ["prod", "frankfurt"],
      "status": "online",
      "device_type": "pikvm",
      "agent_version": "0.4.2",
      "last_seen": "2026-04-15T14:30:00Z",
      "health": {
        "uptime_seconds": 864000,
        "cpu_percent": 12.3,
        "memory_percent": 45.1
      }
    }
  ]
}

Query parameters

Param Description
status Filter by online or offline
tag Filter by tag (repeatable)
search Search by name

Example:

curl "https://app.kvmfleet.io/v1/devices?status=online&tag=prod" \
  -H "Authorization: Bearer $TOKEN"

Get device

curl https://app.kvmfleet.io/v1/devices/dev_abc123 \
  -H "Authorization: Bearer $TOKEN"

Create enrollment token

Generates a single-use enrollment token (30 min TTL) for a new device.

curl -X POST https://app.kvmfleet.io/v1/devices/enrollment \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"suggested_name": "DC1-R3-S8", "suggested_tags": ["prod"]}'
{
  "token": "ekvent_XgiqILZeI6C9FX...",
  "expires_at": "2026-04-15T15:00:00Z",
  "install_cmd": "curl -sSL https://app.kvmfleet.io/install | sh -s -- --token ekvent_..."
}

Required role: admin or owner

Agent registration

Called by the agent during enrollment. Not typically called by users.

curl -X POST https://app.kvmfleet.io/v1/agent/register \
  -H "Content-Type: application/json" \
  -d '{"enrollment_token": "ekvent_...", "hardware_id": "rpi4-serial-xxx"}'
{
  "device_id": "dev_abc123",
  "auth_token": "agt_...",
  "ws_url": "wss://app.kvmfleet.io/v1/agent/ws"
}

Update device

curl -X PATCH https://app.kvmfleet.io/v1/devices/dev_abc123 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "DC1-R3-S8", "tags": ["prod", "munich"]}'

Delete device

curl -X DELETE https://app.kvmfleet.io/v1/devices/dev_abc123 \
  -H "Authorization: Bearer $TOKEN"

Required role: admin or owner