Change the strategy of a run group
const url = 'https://beta-api.plune.ai/v1/run-groups/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"strategy":"optimistic"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Example
{ "strategy": "optimistic"}Responses
Section titled “ Responses ”The group under its new strategy
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
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
Who launched it.
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.
object
The run - one click to GET /v1/runs/{id}/summary.
In the Bin: broken, and out of totals.
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
From the start to the finish; null while the run is not finished.
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.
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.
The status by each of the three strategies — what «Change strategy» previews.
object
The runs out of the Bin, added up: «348 passed · 3 failed · 1 broken · 8 skipped · 360 results in 3 runs».
object
object
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
object
Example generated
{ "error": "example"}No / invalid token or session
A reader changes nothing
object
Example generated
{ "error": "example"}No such group in the project
object
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.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over