Skip to content

Download session report as PDF

GET
/api/sessions/{id}/pdf/
curl --request GET \
--url http://localhost:8000/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pdf/ \
--header 'Authorization: Bearer <token>'

Renders a branded, athlete-friendly PDF of the session: cover page with profile, the metrics summary cards, all charts (trajectory, time-series, joint angles where applicable), and the AI written analysis if available. Synchronously generates the AI block on the fly when the coaching cache is empty so the report always lands complete. ?units=imperial to flip metric / imperial throughout, ?lang=en|ru for the localised copy, ?focus=<metric> to bias the AI block. Returns binary application/pdf.

409 session_not_completed unless the session has finished analysis — a PDF rendered mid-processing carries Score 0 and metrics computed from incomplete data.

id
required
string format: uuid
focus
string

Optional metric/area to bias the AI analysis toward.

lang
string

en (default) or ru.

units
string

metric (default) or imperial.

The rendered report as application/pdf. Sent with Content-Disposition: attachment; filename="aikynetix-<activity>-<yyyymmdd>.pdf".

Media typeapplication/json
string format: binary
Examplegenerated
binary
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
Examples
Example404—NoSuchSessionOnThisTeam

Absent, or owned by another team (collapsed to 404)

{
"detail": "session_not_found"
}
Media typeapplication/json
object
detail
required

409 — the request conflicts with current state. detail is a stable code (e.g. reanalyze_in_flight, already_on_plan, email_in_use). Some 409s carry extra context fields alongside detail; those are documented on the specific endpoint that emits them.

string
Examples
Example409—SessionAnalysisNotComplete

PDF / Share rejected while the session is still pending or processing

{
"detail": "session_not_completed"
}