Skip to content

Change the strategy of a run group

PATCH
/v1/run-groups/{id}
curl --request PATCH \
--url https://beta-api.plune.ai/v1/run-groups/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "strategy": "optimistic" }'

The strategy is the one thing of a group that changes (AC-05). The change is an entry of the feed (run_group, update, the strategy before and after); the same strategy again changes nothing and writes no entry. The answer is the group as read after it, its status by the new rule — there is no stored status to recount. Anyone but a reader, as editing a run.

id
required
string
Media type application/json
object
strategy
required
string
Allowed values: realistic optimistic pessimistic
Example
{
"strategy": "optimistic"
}

The group under its new strategy

Media type application/json

The page of a run group (#1252, frame 046·06): a row an environment with its status, the group’s status by its strategy and by each of the three, and the runs added up.

object
group
required

A launch on several environments (#1252): one run each, and the strategy that makes their statuses one verdict. Its status is computed when read, never stored.

object
id
required
string
title
required
string
nullable
strategy
required
string
Allowed values: realistic optimistic pessimistic
createdBy
required

Who launched it.

string
nullable
createdAt
required
string format: date-time
runs
required

Every run of the group by environment (lower-cased), the ones in the Bin too. A run is never taken out of its group: deleted, it stays in its place as broken; restored, it is an ordinary row again.

Array<object>
object
id
required

The run - one click to GET /v1/runs/{id}/summary.

string
title
required
string
nullable
environment
required
string
nullable
kind
required
string
Allowed values: automated manual mixed eval
statusEvent
required
string
Allowed values: launched finished terminated rerun scheduled
deleted
required

In the Bin: broken, and out of totals.

boolean
counts
required

The six counted statuses, every one present: the summary frozen when the run finished, else counted now (a run in the Bin that never finished shows zeros). A failed or broken result of a muted case is counted as muted, not as a failure; a finished run never changes (#1247).

object
passed
integer
failed
integer
broken
integer
blocked
integer
skipped
integer
muted
integer
total
required
integer
durationMs
required

From the start to the finish; null while the run is not finished.

integer
nullable
status
required

The environment, by the first rule that fits: in the Bin — broken; scheduled, launched or rerun — running; any failed — failed; any broken or blocked, a terminated run, a case expected and not run, or a combination not run or with no result — broken; any passed — passed; else (skipped and muted only, or nothing) — skipped. A muted failure is neither a failure nor a pass.

string
Allowed values: running failed broken passed skipped
status
required

By the group’s strategy. realistic — the group passed when every environment passed; optimistic — when at least one passed; pessimistic — it failed only when every environment failed. While any environment is running the group is running, whatever the strategy. optimistic and pessimistic differ only when no environment passed and some are broken or skipped: then pessimistic passes and optimistic fails.

string
Allowed values: running passed failed
statusBy
required

The status by each of the three strategies — what «Change strategy» previews.

object
realistic
required
string
Allowed values: running passed failed
optimistic
required
string
Allowed values: running passed failed
pessimistic
required
string
Allowed values: running passed failed
totals
required

The runs out of the Bin, added up: «348 passed · 3 failed · 1 broken · 8 skipped · 360 results in 3 runs».

object
counts
required
object
passed
integer
failed
integer
broken
integer
blocked
integer
skipped
integer
muted
integer
total
required
integer
runs
required
integer
Example
{
"group": {
"id": "7a2d4c1e-0000-4000-8000-00000000a252",
"title": "Checkout · release 2.4",
"strategy": "optimistic",
"createdBy": "u-shop",
"createdAt": "2026-09-16T09:12:04.151Z"
},
"runs": [
{
"id": "7a2d4c1e-0000-4000-8000-00000000a253",
"title": "Checkout · release 2.4",
"environment": "dev",
"kind": "automated",
"statusEvent": "finished",
"deleted": false,
"counts": {
"passed": 116,
"failed": 0,
"broken": 0,
"blocked": 0,
"skipped": 4,
"muted": 0
},
"total": 120,
"durationMs": 241000,
"status": "passed"
},
{
"id": "7a2d4c1e-0000-4000-8000-00000000a254",
"title": "Checkout · release 2.4",
"environment": "production",
"kind": "automated",
"statusEvent": "finished",
"deleted": false,
"counts": {
"passed": 120,
"failed": 0,
"broken": 0,
"blocked": 0,
"skipped": 0,
"muted": 0
},
"total": 120,
"durationMs": 252000,
"status": "passed"
},
{
"id": "6f1c2b3a-0000-4000-8000-0000000000d1",
"title": "Checkout · release 2.4",
"environment": "staging",
"kind": "automated",
"statusEvent": "finished",
"deleted": false,
"counts": {
"passed": 112,
"failed": 3,
"broken": 1,
"blocked": 0,
"skipped": 4,
"muted": 0
},
"total": 120,
"durationMs": 263000,
"status": "failed"
}
],
"status": "passed",
"statusBy": {
"realistic": "failed",
"optimistic": "passed",
"pessimistic": "passed"
},
"totals": {
"counts": {
"passed": 348,
"failed": 3,
"broken": 1,
"blocked": 0,
"skipped": 8,
"muted": 0
},
"total": 360,
"runs": 3
}
}

Invalid body: a strategy of the three, nothing else

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

No / invalid token or session

A reader changes nothing

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

No such group in the project

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

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). 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