Dashboard
API Reference

API Reference

The Clawner dashboard exposes a REST API and WebSocket endpoint for managing hosts.

Authentication

Login

POST /api/login
Content-Type: application/json
 
{
  "password": "your-password"
}

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Using the Token

Include the token in the Authorization header:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://your-dashboard.com:9000/hosts

Endpoints

Health Check

GET /health

No authentication required.

{
  "status": "ok",
  "hosts": 5,
  "connectedHosts": 3
}

List Hosts

GET /hosts

Returns all registered hosts.

[
  {
    "id": "host-abc123",
    "name": "Production Server",
    "hostname": "prod-01",
    "ipAddress": "192.168.1.100",
    "openclawVersion": "2026.3.2",
    "openclawInstalled": true,
    "status": "connected",
    "lastSeen": "2026-03-10T00:30:00Z"
  }
]

Get Host Details

GET /hosts/:id

Get Host Metrics

GET /hosts/:id/metrics?hours=24

Returns time-series metrics for the specified host.

[
  {
    "timestamp": 1710028200000,
    "cpu_load": 0.5,
    "memory_used": 4294967296,
    "memory_total": 8589934592,
    "load_1m": 0.5,
    "load_5m": 0.4,
    "load_15m": 0.3
  }
]

Send Command

POST /hosts/:id/command
Content-Type: application/json

{
  "type": "gateway_status"
}

Available Commands

CommandDescriptionPayload
get_statusFull host status
versionOpenClaw version
healthGateway health
gateway_statusDetailed gateway status
start_gatewayStart gateway{ background: true }
stop_gatewayStop gateway
restart_gatewayRestart gateway
list_agentsList agents
add_agentCreate agent{ name, model, ... }
delete_agentRemove agent{ id }
get_configRead config
logsGet logs{ lines: 100 }
doctorHealth checks
update_openclawUpdate OpenClaw

Generate Invite Code

POST /invite

Returns a new invite code for connecting hosts.

{
  "code": "ABC123XY",
  "expiresAt": "2026-03-11T00:30:00Z"
}

WebSocket

Dashboard Connection

Connect to receive real-time updates:

const ws = new WebSocket('wss://your-dashboard.com/ws?dashboard=true');
 
ws.onmessage = (event) => {
  const { event: eventType, data } = JSON.parse(event.data);
  
  switch (eventType) {
    case 'host_connected':
      console.log('Host connected:', data);
      break;
    case 'host_disconnected':
      console.log('Host disconnected:', data);
      break;
    case 'host_updated':
      console.log('Host updated:', data);
      break;
  }
};

Events

EventDescription
welcomeConnection established
host_connectedNew host joined
host_disconnectedHost went offline
host_updatedHost metrics updated