Vetrix Docs

Admin Dashboard API

The admin dashboard surfaces system health, CI runner status, and queue depth through a single health endpoint. All endpoints require an admin JWT.

System health

GET /api/v1/admin/health
Authorization: Bearer <admin-jwt>

Response:

{
  "db": {
    "reachable": true,
    "latency_ms": 2000000,
    "total_conns": 8,
    "idle_conns": 5,
    "max_conns": 25
  },
  "disk": {
    "path": "/data",
    "total_gb": 500.0,
    "free_gb": 320.5,
    "used_pct": 35.9
  },
  "runners": {
    "total": 4,
    "idle": 3,
    "busy": 1,
    "offline": 0
  },
  "queue": {
    "pending_jobs": 2
  },
  "process": {
    "uptime_seconds": 86400
  }
}

latency_ms is the round-trip time for a DB ping in nanoseconds (Go time.Duration serialised as an integer — divide by 1,000,000 for milliseconds).

CI runners

Listing runners

GET /api/v1/admin/runners

Registering a runner

POST /api/v1/admin/runners
Content-Type: application/json

{
  "name": "linux-amd64-01",
  "tags": ["linux", "amd64", "docker"]
}

Response (201 Created):

{
  "token": "runner_...",
  "runner": {
    "id": "...",
    "name": "linux-amd64-01",
    "token_hash": "...",
    "tags": ["linux", "amd64", "docker"],
    "status": "offline",
    "last_seen_at": null,
    "created_at": "2026-04-11T14:00:00Z"
  }
}

The token field is the raw registration token shown once only. Configure the runner agent with this token. The stored token_hash is a SHA-256 hex digest and cannot be used directly.

Deleting a runner

DELETE /api/v1/admin/runners/{id}