API Reference
Complete REST API reference for the barkcli web server. All endpoints require authentication when --token is used.
Board Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/boards | List all board names |
| POST | /api/boards/create | Create a new board |
| DELETE | /api/boards/:name | Delete a board |
| GET | /api/board?name= | Get board YAML |
| PUT | /api/board | Save board YAML |
Card Endpoints
| Method | Endpoint | Description |
|---|
| POST | /api/board/cards/:id/comments | Add comment to card |
Memory Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/memory?q=&tier=&limit= | List/search memories |
| POST | /api/memory | Add memory entry |
| DELETE | /api/memory/:id | Delete memory |
| GET | /api/memory/stats | Memory statistics |
| POST | /api/memory/fact | Add project fact |
| GET | /api/memory/facts | List project facts |
Specs Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/specs | List specs |
| POST | /api/specs | Create spec |
| GET | /api/specs/:id | Get spec details |
| PUT | /api/specs/:id | Update spec |
| DELETE | /api/specs/:id | Delete spec |
| POST | /api/specs/:id/requirements | Add requirement |
| PUT | /api/specs/:id/requirements/:req_id | Update requirement |
| GET | /api/specs/:id/trace | Traceability view |
| GET | /api/specs/coverage | Coverage report |
Checkpoint Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/checkpoints | List checkpoints |
| POST | /api/checkpoints | Save checkpoint |
| POST | /api/checkpoints/:id/restore | Restore checkpoint |
Undo/Diff/Blame Endpoints
| Method | Endpoint | Description |
|---|
| POST | /api/undo | Undo last change |
| GET | /api/diff | Show diff from last state |
| GET | /api/blame/:card_id | Card change history |
| POST | /api/snapshot | Save named snapshot |
Import/Export Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/export?format= | Export board (yaml/json) |
| POST | /api/import | Import board |
Validate/Doctor Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/validate | Validate all boards |
| POST | /api/doctor | Auto-fix board issues |
Management Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/tasks | List tasks |
| POST | /api/tasks | Create task |
| GET | /api/tasks/:id | Get task |
| PUT | /api/tasks/:id | Update task |
| DELETE | /api/tasks/:id | Delete task |
| POST | /api/tasks/:id/claim | Claim task for agent |
| POST | /api/tasks/:id/complete | Complete task |
| POST | /api/tasks/:id/fail | Fail task |
| GET | /api/agents | List agents |
| POST | /api/agents | Register agent |
| GET | /api/agents/:id | Get agent |
| DELETE | /api/agents/:id | Remove agent |
| POST | /api/orchestrate/cycle | Run orchestration cycle |
| GET | /api/orchestrate/status | Orchestration status |
Other Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/history | Operation history |
| GET | /api/sessions | Agent sessions |
| GET | /api/context | Code context |
| POST | /api/context/sync | Git-aware context refresh |
| GET | /api/code?q= | Symbol search |
| GET | /api/config | AI configuration |
| WS | /ws | WebSocket for live reload |
Authentication
When the server is started with --token, all API endpoints require:
- •Query parameter:
?token=mysecret - •Header:
Authorization: Bearer mysecret
Static assets (HTML, JS, CSS) are always public.