Download session report as PDF
const url = 'http://localhost:8000/api/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pdf/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Optional metric/area to bias the AI analysis toward.
en (default) or ru.
metric (default) or imperial.
Responses
Section titled “Responses”The rendered report as application/pdf. Sent with Content-Disposition: attachment; filename="aikynetix-<activity>-<yyyymmdd>.pdf".
Examplegenerated
binaryobject
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).
Examplegenerated
{ "detail": "example"}object
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).
Examples
Absent, or owned by another team (collapsed to 404)
{ "detail": "session_not_found"}object
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.
Examples
PDF / Share rejected while the session is still pending or processing
{ "detail": "session_not_completed"}