API hay dùng — tra cứu
Thay
<host>,<spaceId>,<taskId>bằng giá trị thật. Ma trận quyền của từng endpoint: Phân quyền Board.
Task & agent (member+; approve/rework cần admin + human)
| Việc | Endpoint |
|---|---|
| Liệt kê / tạo task | GET·POST /api/tasks?projectId=<spaceId> |
| Tạo task hàng loạt | POST /api/tasks/batch (kiểm quyền mọi Space tham chiếu) |
| Chạy / dừng agent | POST /api/tasks/:id/run · POST /api/tasks/:id/stop |
| Nhắn cho agent đang chạy | POST /api/tasks/:id/message (tab Follow-up) |
| Ghi checks (lint/test/typecheck) | POST /api/tasks/:id/checks |
| Xem verdict / activities / events | GET /api/tasks/:id/reviews · .../activities · .../events |
| Approve / Request Changes | POST /api/tasks/:id/approve · POST /api/tasks/:id/rework |
| Dọn worktree bẩn | POST /api/tasks/:id/cleanup-worktree |
| Archive (thay Delete) | PATCH /api/tasks/:id/archive |
| Quan hệ phụ thuộc | POST /api/tasks/<blocker>/links {"relatedId":"<task>","linkType":"blocks"} |
| Agent khả dụng trên PATH | GET /api/agents |
Plan, Group, Template
| Việc | Endpoint |
|---|---|
| Tạo / sửa plan | POST·PATCH /api/plans* |
| Apply Plan (1 transaction) | POST /api/plans/:id/apply |
| Tạo / chạy / dừng Group | POST /api/groups* · POST /api/groups/:id/run · POST /api/groups/:id/stop |
| Template dùng lại | GET·POST /api/templates |
Space & Wiki
| Việc | Endpoint |
|---|---|
Tạo Space (người tạo thành owner) | POST /api/projects |
| Sửa / xoá Space | PATCH·DELETE /api/projects/:id (owner) |
| Quản thành viên | GET·POST /api/spaces/:id/members · DELETE /api/spaces/:id/members/:email (owner; 409 nếu xoá owner cuối) |
| Ghi / duyệt Wiki draft | POST /api/wiki/drafts (member) · POST /api/wiki/drafts/:id/approve / .../reject (admin + human) |
| Danh tính của tôi | GET /api/me (type: human, email) |
Cờ tính năng & realtime theo Space
| Việc | Endpoint |
|---|---|
| Xem cờ server đang bật (palette, mention-subtask, auto-retro, ws-topics, …) | GET /api/features (trả boolean thuần, không lộ giá trị cấu hình) |
Vào / rời phòng realtime của Space qua WebSocket /ws | Gửi { "type": "subscribe", "spaceId": "<spaceId>" } → nhận { "type": "subscribed", ... }; rời bằng { "type": "unsubscribe", ... } |
# Sysadmin kiểm cờ trong container (server là nguồn chân lý, client chỉ đọc)
docker exec agentjira_server sh -c 'env | grep AGENTBOARD_'
curl -s http://<host>/api/features | jq .