API reference for the Minion Server. Base URL: http://localhost:3001
Authentication: Authorization: Bearer $API_TOKEN (required unless noted otherwise)
No authentication required.
| Method | Endpoint | Description |
|---|
| GET | /api/health | Health check ({status:'ok', timestamp}) |
| GET | /api/status | Agent state, uptime, version, HQ connection status |
| POST | /api/status | Update status. Body: {status, current_task} |
| Method | Endpoint | Description |
|---|
| GET | /api/list-skills | List locally deployed skills |
| DELETE | /api/skills/:name | Delete a local skill |
| POST | /api/skills/push/:name | Push a local skill to HQ |
| POST | /api/skills/fetch/:name | Fetch a skill from HQ and deploy locally |
| GET | /api/skills/remote | List skills on HQ |
| Method | Endpoint | Description |
|---|
| GET | /api/workflows | List local workflows (includes next_run) |
| POST | /api/workflows | Receive/upsert a workflow (from HQ or local) |
| POST | /api/workflows/push/:name | Push a local workflow to HQ |
| POST | /api/workflows/fetch/:name | Fetch a workflow from HQ (pipeline skills auto-fetched) |
| GET | /api/workflows/remote | List workflows on HQ |
| DELETE | /api/workflows/:id | Delete a local workflow |
| POST | /api/workflows/trigger | Manual trigger. Body: {workflow_id} |
| Method | Endpoint | Description |
|---|
| GET | /api/executions | Execution history (?limit=50, ?workflow_id=) |
| GET | /api/executions/:id | Individual execution details |
| GET | /api/executions/:id/log | Get execution log (?tail=N) |
| POST | /api/executions/:id/outcome | Report outcome (no auth required). Body: {outcome, summary?, details?} |
Outcome values: success, failure, partial
| Method | Endpoint | Description |
|---|
| GET | /api/terminal/sessions | List tmux sessions |
| POST | /api/terminal/send | Send keys. Body: {session, input?, enter?, special?} |
| POST | /api/terminal/create | Create session. Body: {name?, command?} |
| POST | /api/terminal/kill | Kill session. Body: {session} |
| GET | /api/terminal/capture | Capture pane content. Query: ?session=&lines=100 |
| GET | /api/terminal/ttyd/status | ttyd process status |
| POST | /api/terminal/ttyd/start | Start ttyd. Body: {session} |
| POST | /api/terminal/ttyd/stop | Stop ttyd. Body: {session} |
| POST | /api/terminal/ttyd/stop-all | Stop all ttyd processes |
Files are stored under ~/files/. Maximum upload size: 50MB.
| Method | Endpoint | Description |
|---|
| GET | /api/files | List files in directory. Query: ?path=subdir |
| GET | /api/files/* | Download file |
| POST | /api/files/* | Upload file (Content-Type: application/octet-stream) |
| DELETE | /api/files/* | Delete file or directory |
| Method | Endpoint | Description |
|---|
| GET | /api/commands | List available commands |
| POST | /api/command | Execute command. Body: {command} |
Available commands: restart-agent, update-agent, restart-display, status-services