Skip to content

Start a run from the plan

POST
/v1/plans/{id}/launch
curl --request POST \
--url https://beta-api.plune.ai/v1/plans/example/launch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "environment": "staging", "labels": [ "release" ] }'

The same road a reporter takes (POST /v1/runs), with the plan as the caller that knows what to expect: a run of the plan’s kind, configuration.expected set to what the plan collects at this moment (each with its first external key, so a reporter joining the run matches by it), meta.planId for provenance, the plan’s title unless the body names another. The body is optional. A plan that collects nothing is not launched (409) — a run of nothing would finish green.

id
required
string
Media type application/json

What a launch may say about the run it starts; everything else the plan says. No body at all is a launch under the plan’s own title.

object
title

Defaults to the plan’s title.

string
>= 1 characters <= 200 characters
environment
string
>= 1 characters <= 64 characters
labels
Array<string>
<= 32 items
assignment

As on POST /v1/runs (B8-team T4): prefer-assignee copies each collected case’s assignee into configuration.assignees.

string
default: none
Allowed values: none prefer-assignee
Example
{
"environment": "staging",
"labels": [
"release"
]
}

The run, launched — open it to walk the manual cases or point a reporter at it

Media type application/json
object
run
required
object
id
string
projectId
string
kind
string
Allowed values: automated manual mixed eval
externalKey
string
nullable
statusEvent

The value rerun is reached only by joining a terminated run again — it is never requested.

string
Allowed values: launched finished terminated rerun
configuration

What the run expects to happen. Without it, a crashed shard is indistinguishable from a green run.

object
expected
required
Array<object>
<= 10000 items
object
testCaseId
string
externalKey
object
key
additional properties
any
matrix
object
key
additional properties
Array<string>
full

The caller states that expected is everything its source has — the whole suite, not one file or a --grep. When such a run finishes with an empty notRun, every active case that this source (the source of the run’s results) reported before and did not report in this run moves to detached, with the run named as the reason. Manual cases, other sources, in_review and deprecated cases are never touched; a later result on a detached case brings it back to active by itself. Set it only for the run that covers the whole suite (PLUNE_FULL_RUN=1 in the CLI).

boolean
assignees

Who is to run which case (B8-team T4): testCaseIduserId. Filled at launch by assignment: prefer-assignee from each expected case’s assigneeId at that moment — a snapshot, so a case that changes hands later does not rewrite a run under way. Cases nobody holds are absent. May also be sent as is.

object
key
additional properties
string
meta
object
sha
string
branch
string
ciUrl
string format: uri
runner
string
planId

The plan the run was launched from (D33), when it was — what GET /v1/runs?planId= filters by.

string
title

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.

string
>= 1 characters <= 200 characters
environment

Where it ran — staging, prod, a preview. Filterable on GET /v1/runs, so two CI matrices read as two histories.

string
>= 1 characters <= 64 characters
labels

How the run is marked — smoke, nightly, a team name. An empty array is how every mark is removed.

Array<string>
<= 32 items
startedAt
string format: date-time
finishedAt
string format: date-time
nullable
terminateReason
string
nullable
summary

What a run amounted to, frozen at finish. Distinct from RunSummary, which is the list-item shape.

object
counts
required

One entry per status that occurred; an absent key means zero.

object
key
additional properties
integer
notRun
required

Expected and never reported — what keeps a dead shard from looking green.

Array<string>
total
required
integer
createdBy

Who launched it (B8-team T3): the userId of the session, or of the owner of the token that started or synced it — the first shard to create the run; a joiner is not recorded. null for a run from before names were kept. Resolve it to a name through GET /v1/members.

string
nullable
Example
{
"run": {
"id": "6f1c2b3a-0000-4000-8000-0000000000d1",
"projectId": "u-shop::default",
"kind": "mixed",
"externalKey": null,
"statusEvent": "launched",
"configuration": {
"expected": [
{
"testCaseId": "6f1c2b3a-0000-4000-8000-0000000000c1",
"externalKey": {
"kind": "path-title",
"value": "e2e/checkout.spec.ts > Checkout — empty cart"
}
}
]
},
"meta": {
"planId": "6f1c2b3a-0000-4000-8000-0000000000f3"
},
"startedAt": "2026-09-16T09:12:04.151Z",
"finishedAt": null,
"terminateReason": null,
"summary": null,
"title": "Release regression",
"environment": "staging",
"labels": [
"release"
],
"createdBy": "u-shop"
}
}

Invalid body

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

No such plan in your projects

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The plan collects no case right now

Media type application/json
object
error
required
string
Example
{
"error": "the plan matches no case — nothing to run"
}

Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over