Following a task
One stream of server-sent events from creation to done.
curl -N https://api.phronen.ai/api/v1/tasks/{id}/events \
-H "Authorization: Bearer $PHRONEN_KEY" \
-H "Accept: text/event-stream"id: 1
event: stage
data: {"stage":"understand","status":"queued"}
id: 7
event: approval
data: {"proposal_id":"proposal-from-this-event","action":"Point DNS at the new host","reason":"Changes where the domain resolves","risk":"medium"}
id: 12
event: evidence
data: {"kind":"command","ref":"curl -I https://example.com","status":"pass"}
id: 13
event: done
data: {"status":"completed"}| event | Carries |
|---|---|
| stage | which move the task is on and its status, with a plain-language detail |
| evidence | an evidence item as it is recorded |
| approval | what the task wants to do, why, and how risky it is; the task waits until a decision arrives |
| done | final status: completed means verified; failed and cancelled carry a reason |
| ping | keep-alive, every few seconds |
Reconnect with Last-Event-ID to resume where you left off. The same events drive the web, the phone and the menu bar.
Was this page helpful?