Events API
Query repository events, event details, termination, redispatch, conversation threads, and knowledge capture.
Events are the execution records of a Pipeline. One Issue can correspond to multiple events, and each event has a seq.
Endpoints
Queries
| Method | Path | Purpose | Authentication |
|---|---|---|---|
GET |
/api/events/{owner}/{repo} |
Repository event list | dual |
GET |
/api/events/detail/{seq} |
Event details | dual |
POST |
/api/events/{seq}/a2a-redo |
A2A manual redo (hand-off) | user-level |
GET |
/api/events/{seq}/thread |
Event conversation thread | user-level |
GET |
/api/events/{seq}/a2a-redo/scene |
A2A redo scene info | user-level |
Operations
| Method | Path | Purpose | Authentication |
|---|---|---|---|
POST |
/api/events/{seq}/terminate |
Terminate an event | user-level |
POST |
/api/events/{seq}/redispatch |
Redispatch an event | user-level |
POST |
/api/events/{seq}/flow/reset |
Reset the flow | user-level |
Knowledge and conversation
| Method | Path | Purpose | Authentication |
|---|---|---|---|
DELETE |
/api/events/{seq}/knowledge/{scope} |
Delete Issue knowledge | user-level |
POST |
/api/events/{seq}/knowledge |
Agent captures shared knowledge | tk_ |
POST |
/api/events/{seq}/chat |
Send an event message | user-level |
POST |
/api/events/{seq}/chat/stream |
Conversation SSE | user-level |
POST |
/api/events/{seq}/chat/submit |
Asynchronous submit | user-level |
GET |
/api/events/chat/task/{task_id}/status |
Asynchronous status | user-level |
GET |
/api/events/chat/task/{task_id}/stream |
Asynchronous stream | user-level |
DELETE |
/api/events/{seq}/chat |
Delete the conversation thread | user-level |
"User-level" means a grape_ API key or a web JWT; tk_ returns 403.
Query events
curl -fsS -H @~/.grape.auth \
"$GRAPE_BASE_URL/api/events/<owner>/<repo>?page=1&page_size=20"
Event details:
curl -fsS -H @~/.grape.auth \
"$GRAPE_BASE_URL/api/events/detail/123"
Event lists and details are both restricted by repository permissions. detail is dual, so tk_ works within the repository scope.
Terminate an event
POST /api/events/{seq}/terminate
Stops an event that is running or queued. Termination is a manual intervention; before executing it, confirm the target seq and Issue to avoid stopping the wrong one.
Redispatch an event
POST /api/events/{seq}/redispatch
Dispatches an event again. Use it after a node failure or a temporary Engine outage; do not redispatch events that are already complete.
Event conversation
Send:
POST /api/events/{seq}/chat
Streaming:
POST /api/events/{seq}/chat/stream
Accept: text/event-stream
After an asynchronous submit, fetch the result with GET /api/events/chat/task/{task_id}/status or /stream. Delete a thread with DELETE /api/events/{seq}/chat.
Common errors
| Status | Cause |
|---|---|
| 400 | Missing parameters or an invalid seq |
| 403 | Repository mismatch, or tk_ calling a user-level endpoint |
| 404 | The event does not exist |
| 409 | The event status does not allow the current operation |