Skip to content

Rename, restore, or set the visible sections of a Solution run

PATCH
/api/solutions/runs/{run_id}/
curl --request PATCH \
--url http://localhost:8000/api/solutions/runs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "archived": true, "hidden_sections": [ "ai" ] }'

Partial update (#1192): name sets the coach-editable display name (blank clears back to the client-computed default); archived: false restores an archived run to the active list (true archives it). Send whichever applies — all are optional. Team-scoped; cross-team 404.

hidden_sections (#1977) switches whole sections off for this run — the coach sends a client a metrics-only report. One setting, three surfaces: the authenticated web report, the public share link and the downloaded PDF all omit them, because the prune happens once during report assembly. The metrics are the report’s floor and have no key. A share link already issued keeps the set it was minted with; re-clicking Share re-stamps it.

run_id
required
string format: uuid

PATCH /api/solutions/runs/<id>/ — rename, (un)archive, and/or set the switched-off report sections of a run (#1192, #1977). Every field is optional so a rename (name), a restore (archived: false) and a section edit (hidden_sections) share one endpoint; send whichever applies.

object
name

New display name; blank clears back to the computed default.

string
<= 200 characters
archived

false restores an archived run to the active list; true archives it (same as DELETE without ?permanent).

boolean
hidden_sections

Report sections to omit from the web report, the public share link and the PDF. One or more of ai, injury, graphs, phases, frames, profile, comparisons, trends, metric_notes. [] renders the full report. The metrics are the report’s floor and cannot be switched off — there is no key for them.

Array<string>
<= 9 items
Allowed values: ai injury graphs phases frames profile comparisons trends metric_notes
Media typeapplication/json

One row in the reports manager (#1192). name is the raw stored name (blank until the coach renames the run — the FE renders a localized fallback when blank); client_name / session_count are display helpers. sessions (the report’s constituent captures) is populated only when the view seeds a session_refs context map — see session_refs_for_runs.

object
id
required
string format: uuid
name
string
<= 200 characters
solution_slug
required
string
<= 64 characters
solution_name
required
string
activity
required
string
status
  • draft - Draft
  • ready - Ready
  • failed - Failed
string
Allowed values: draft ready failed
client_id
required
string format: uuid
nullable
client_name
required
string
session_count
required
integer
sessions
required
Array<object>

A constituent session of a run (one entry of its bindings) — enough for the reports card to render like a Sessions journal row: label + link it (the expandable “attached sessions” list) plus its headline metrics chips (#1192). Read-only projection; the run’s report is still assembled from the sessions’ metrics on retrieve.

object
id
required
string format: uuid
activity
required
string
exercise
required
string
created_at
required
string format: date-time
seq_no
required
integer
nullable
camera_view
required
string
nullable
metrics
required
Array<object>

One headline metric on a candidate row — the picker shows the top few as chips (mirrors the Sessions journal row shape).

object
key
required
string
value_num
required
number format: double
nullable
value_json
required
nullable
created_at
required
string format: date-time
archived_at
string format: date-time
nullable
Example
{
"status": "draft"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}