List preset exercises, recording guides, and metric specs
const url = 'http://localhost:8000/api/exercises/';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/exercises/ \ --header 'Authorization: Bearer <token>'The catalogue endpoint. Pass ?activity=running (or any supported activity) to receive the curated preset list, the activity-level recording guide (camera placement, framing, lighting), per-exercise overrides where they exist (use guides_by_exercise[exercise] if present, fall back to guide), the list of MetricSpec dicts the analyzers will emit, and the supported camera views per exercise. Use this to drive a dynamic upload UI — exercise picker, recording instructions, view picker (per pair, not per activity), and a preview of which metrics this session will produce. ?lang=en|ru localises the recording guide text.
Omit activity and the response carries by_activity — every activity mapped to its preset list — with presets / metrics / views_by_exercise left empty. That is the shape a picker grouping exercises under activity headings needs, and it costs one request instead of one per activity.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Activity to fetch the catalogue for. OMIT it to get the whole catalogue under by_activity instead — one request for a picker that groups exercises by activity (#1354).
en (default) or ru — localises the recording guide text.
Responses
Section titled “Responses”object
Activity → its preset list, the WHOLE catalogue. Populated only when the request omits activity; empty otherwise. Drives the journal’s exercise filter, which groups its options under activity headings and would otherwise need one request per activity to build a single dropdown (#1354).
object
Activity-level default recording guide.
object
Per-exercise recording guide. Keyed by exercise name. Falls back to guide when an exercise has no override. Front-ends should prefer this if present.
object
object
Exercise → list of MetricSpec
object
object
Per-exercise supported camera views — one of side (sagittal, always present), front, back. Front-end uses this to gate the camera-view picker per (activity, exercise) pair: hide when the list has only one entry, show otherwise. Source of truth is aikmodels’ views_for_pair() — adding a frontal/posterior analyzer in aikmodels flows through here without a Django-side edit.
object
Per-(exercise, camera_view) recording guide. Nested {exercise: {view: {Camera, Distance, Duration, ...}}}. Front-end shows guides_by_exercise_view[exercise][view] once the user has committed to both — gives a front-camera Bodyweight Squat its own framing recipe instead of the side-view default. Falls back to guides_by_exercise[exercise] (then guide) when a view-specific override doesn’t exist for that pair.
object
object
object
Examplegenerated
{ "activity": "example", "presets": [ "example" ], "by_activity": { "additionalProperty": [ "example" ] }, "guide": { "additionalProperty": "example" }, "guides_by_exercise": { "additionalProperty": { "additionalProperty": "example" } }, "metrics": { "additionalProperty": [ { "additionalProperty": "example" } ] }, "views_by_exercise": { "additionalProperty": [ "example" ] }, "guides_by_exercise_view": { "additionalProperty": { "additionalProperty": { "additionalProperty": "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).
Examplegenerated
{ "detail": "example"}