Finish or terminate a run
const url = 'https://beta-api.plune.ai/v1/runs/example/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"event":"finish","reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/runs/example/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "event": "finish", "reason": "example" }'The run lifecycle. finish freezes the summary and closes the run to new results; terminate closes it with a reason and can be reopened by joining the same key again. A repeated finish is an idempotent success — the CI step that sends it may itself be retried. Terminating an already finished run is the one refusal: its summary may already have gated a release.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Responses
Section titled “ Responses ”The run, and its summary if it just finished
object
object
The value rerun is reached only by joining a terminated run again — it is never requested.
What the run expects to happen. Without it, a crashed shard is indistinguishable from a green run.
object
object
object
object
object
What to call this run in a list. The first shard to declare one wins; a shard that arrives later fills a field left empty rather than overwriting.
Where it ran — staging, prod, a preview. Filterable on GET /v1/runs, so two CI matrices read as two histories.
How the run is marked — smoke, nightly, a team name. An empty array is how every mark is removed.
What a run amounted to, frozen at finish. Distinct from RunSummary, which is the list-item shape.
object
One entry per status that occurred; an absent key means zero.
object
Expected and never reported — what keeps a dead shard from looking green.
What a run amounted to, frozen at finish. Distinct from RunSummary, which is the list-item shape.
object
One entry per status that occurred; an absent key means zero.
object
Expected and never reported — what keeps a dead shard from looking green.
Example
{ "run": { "kind": "automated", "statusEvent": "launched" }}Not a known event
object
Example generated
{ "error": "example"}No / invalid token or session
Not found or not yours
object
Example generated
{ "error": "example"}The event does not apply from this state; the body names what does
object
What WOULD apply from this state. A CI script needs this to stop retrying.
Example generated
{ "error": "example", "from": "example", "event": "example", "allowed": [ "example" ]}Rate limited