Download a session comparison as PDF
const url = 'http://localhost:8000/api/sessions/compare/pdf/?ids=example';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/compare/pdf/?ids=example' \ --header 'Authorization: Bearer <token>'Renders a branded side-by-side comparison PDF for 2–4 completed sessions (#1002): per-session header (name / date / client) and the common-metric matrix with per-cell green-zone tinting — the printable twin of the web Compare view. ?ids=<uuid>,<uuid> picks the sessions (order preserved), ?units=imperial flips the unit system, ?lang=en|ru|es localises the chrome. Returns binary application/pdf.
409 session_not_completed unless every session has finished analysis.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Comma-separated list of 2–4 session UUIDs, in the column order to print.
en (default), ru or es.
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).
Examples
Fewer than 2 / more than 4 / duplicate session ids
{ "ids": [ "Pass 2-4 distinct session ids." ]}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).
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"}