Skip to content

Produce a Solution run

POST
/api/solutions/{slug}/runs/
curl --request POST \
--url http://localhost:8000/api/solutions/example/runs/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "client_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "bindings": { "additionalProperty": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "force": false, "audience": "practitioner" }'

Bind existing sessions to the Solution’s movement slots and persist a run. Required slots must each carry ≥1 session; every session must belong to the workspace, be completed, and match its slot’s movement. Returns the run id.

Dedup (#1192): if an active run with these exact bindings already exists, responds 409 with the existing run instead of minting a duplicate — send force=true to override and create a new one.

audience (#2040) is who the report is written for — practitioner (default), coach or athlete. It is not part of the dedup identity: the same captures in another tier are the same report, read differently.

slug
required
string

Request body for POST /api/solutions/<slug>/runs/ — bind sessions to the solution’s movement slots.

object
client_id

Athlete the report is about (optional).

string format: uuid
nullable
bindings
required

{ movementSlotId: [sessionId, ...] } — list per slot.

object
key
additional properties
Array<string>
force

Bypass dedup and create a new run even if an active one with these exact bindings already exists (#1192).

boolean
audience

Who the report is written for. practitioner (the default) is the full report. coach leaves out the joint-angle graphs, the movement-profile radar and the frame-by-frame stills. athlete is for the athlete or a parent: a plain-language summary, at most five takeaways and the headline metrics, with every joint angle and the analysis sections left out. The web report, the PDF and every link minted from it apply the same tier.

  • practitioner - practitioner
  • coach - coach
  • athlete - athlete
string
Allowed values: practitioner coach athlete
Media typeapplication/json
object
id
required

The created run id.

string format: uuid
status
required
string

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "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

Example generated

{
"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

Example generated

{
"detail": "example"
}
Media typeapplication/json

409 from POST .../runs/ — an active run with these exact bindings already exists (#1192). Retry with force=true to create a duplicate.

object
detail
required

solution_run_exists.

string
existing
required

{ id, name, created_at, audience } of the existing active run.

object
key
additional properties

Example generated

{
"detail": "example",
"existing": {
"additionalProperty": "example"
}
}