Audit history for one threshold row
const url = 'http://localhost:8000/api/thresholds/example/audit/';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/thresholds/example/audit/ \ --header 'Authorization: Bearer <token>'Any team member. Paginated reverse-chronological list of every create / update / delete on the given threshold row, with before/after bounds, sign-off note, and the signing admin. limit (default 25, max 200) + offset (default 0) for pagination; response envelope carries total so the client can render “showing N of M”.
Returns 400 (keyed on limit) when limit / offset is not an integer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Page size (default 25, max 200).
Row offset (default 0).
Responses
Section titled “Responses”object
object
object
create- createupdate- updatedelete- delete
object
object
running- Runningwalking- Walkingjump- Vertical Jumpweightlifting- Weightliftingmobility- Mobility Assessmentworkspace_wellness- Workspace Wellnessagility- Agilityfencing- Fencingcycling- Cyclingtennis- Tennispadel- Padel Tennisbowling- Bowlingbaseball- Baseballfootball- Footballbadminton- Badmintoncricket- Cricketbasketball- Basketballscuba_diving- Scuba Divingice_hockey- Ice Hockeyamerican_football- American Footballfri- Falls Risk Indicator
Examples
Audit page
{ "items": [ { "action": "update", "metric_key": "cadence", "before": { "min_good": 175, "max_good": 185 }, "after": { "min_good": 178, "max_good": 184 }, "reason": "Narrowed after week-4 data", "signed_off_by": "coach@club.example", "created_at": "2026-05-20T14:31:00Z" } ], "total": 1, "limit": 25, "offset": 0}limit / offset is not an integer (keyed on limit).
Validation error keyed by parameter name — each key is the offending query parameter, each value the list of human-readable messages for it.
object
Examples
400 — limit/offset is not an integer
{ "limit": [ "limit/offset must be integers" ]}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).
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
404 — No such threshold on this team
{ "detail": "threshold not found"}