Reset a team threshold to system default (audited)
const url = 'http://localhost:8000/api/thresholds/example/';const options = {method: 'DELETE', 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 DELETE \ --url http://localhost:8000/api/thresholds/example/ \ --header 'Authorization: Bearer <token>'Any team member; audited. Deletes the team’s override row so the resolver falls back to the system / MetricSpec default. reason is required (sign-off note), notes optional. Writes a MetricThresholdAudit entry (action=delete) capturing the pre-delete bounds in the same transaction.
Query param cascade=true (default false) also wipes sibling gender / segment overrides for the same (activity, exercise, metric_key) so the OverrideBadge stops showing them — “Reset cadence” semantics. Returns 204 No Content on success.
Returns 400 when the reset would leave an ordered metric pair overlapping (walking stance_length vs stride_length, #1236) — a band the resolver falls back to can be higher than the team’s own, so a reset can re-open an overlap the write path refused. Applies to a cascade=true sweep as a whole, including an overlap it leaves against a MORE specific surviving row. The whole delete is rolled back; adjust or reset the counterpart metric first. detail-keyed, since no bound was submitted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”When true, also reset sibling gender/segment overrides for the same metric.
Responses
Section titled “Responses”No response body
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
400 — reset would re-open the overlap
{ "detail": "Resetting this band would leave the Stance Length and Stride Length bands overlapping for Treadmill on this team: Stance Length reaches 0.9 while Stride Length starts at 0.6. A full gait cycle always covers more ground than a single stance, because a foot is planted for less time than the cycle it belongs to — the two bands cannot overlap. Adjust Stance Length down or Stride Length up — including any gender / age / skill overrides you have saved for either, since the widest of them is what an athlete can be scored against."}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"}