Skip to content

Audit history for one threshold row

GET
/api/thresholds/{id}/audit/
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.

id
required
string
limit
integer

Page size (default 25, max 200).

offset
integer

Row offset (default 0).

Media typeapplication/json
object
items
required
Array<object>
object
id
required
string format: uuid
threshold_id
required
string
nullable
timestamp
required
string format: date-time
signed_off_by
required
object
id
required
string
display_name
required
string
action
required
  • create - create
  • update - update
  • delete - delete
string
Allowed values: create update delete
before
required
object
min_good
number
nullable
max_good
number
nullable
after
required
object
min_good
number
nullable
max_good
number
nullable
activity
required
  • running - Running
  • walking - Walking
  • jump - Vertical Jump
  • weightlifting - Weightlifting
  • mobility - Mobility Assessment
  • workspace_wellness - Workspace Wellness
  • agility - Agility
  • fencing - Fencing
  • cycling - Cycling
  • tennis - Tennis
  • padel - Padel Tennis
  • bowling - Bowling
  • baseball - Baseball
  • football - Football
  • badminton - Badminton
  • cricket - Cricket
  • basketball - Basketball
  • scuba_diving - Scuba Diving
  • ice_hockey - Ice Hockey
  • american_football - American Football
  • fri - Falls Risk Indicator
string
Allowed values: running walking jump weightlifting mobility workspace_wellness agility fencing cycling tennis padel bowling baseball football badminton cricket basketball scuba_diving ice_hockey american_football fri
exercise
required
string
nullable
metric_key
required
string
<= 80 characters
reason
required
string
notes
string
total
required
integer
limit
required
integer
offset
required
integer
Examples
ExampleAuditPage

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).

Media typeapplication/json

Validation error keyed by parameter name — each key is the offending query parameter, each value the list of human-readable messages for it.

object
key
additional properties
Array<string>
Examples
Example400—Limit/offsetIsNotAnInteger

400 — limit/offset is not an integer

{
"limit": [
"limit/offset must be integers"
]
}
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
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—NoSuchThresholdOnThisTeam

404 — No such threshold on this team

{
"detail": "threshold not found"
}