Replace the coach's hidden player-metric set
const url = 'http://localhost:8000/api/me/hidden-metrics/';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"activity":"running","exercise":"","hidden":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8000/api/me/hidden-metrics/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "activity": "running", "exercise": "", "hidden": [ "example" ] }'Idempotent full-replace of the hidden metric-group set for one (activity, exercise). The player sends the COMPLETE hidden set after each hide / restore (not a patch), so a dropped concurrent write can’t silently re-show a hidden card. Keys are normalised (deduped, blank / over-long dropped, capped at 64); an empty hidden clears the curation. Returns the stored set. Per-admin — no owner gate.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”PUT /api/me/hidden-metrics/ request — replace the hidden set for
one (activity, exercise). Idempotent full-replace (not a patch): the
player sends the complete hidden set after each hide/restore, so a
dropped concurrent write can’t silently re-show a hidden card.
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
Exercise within the activity; ‘’ for the activity-level set.
Metric-group keys to hide. Empty clears the curation.
PUT /api/me/hidden-metrics/ request — replace the hidden set for
one (activity, exercise). Idempotent full-replace (not a patch): the
player sends the complete hidden set after each hide/restore, so a
dropped concurrent write can’t silently re-show a hidden card.
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
Exercise within the activity; ‘’ for the activity-level set.
Metric-group keys to hide. Empty clears the curation.
PUT /api/me/hidden-metrics/ request — replace the hidden set for
one (activity, exercise). Idempotent full-replace (not a patch): the
player sends the complete hidden set after each hide/restore, so a
dropped concurrent write can’t silently re-show a hidden card.
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
Exercise within the activity; ‘’ for the activity-level set.
Metric-group keys to hide. Empty clears the curation.
Responses
Section titled “Responses”GET/PUT /api/me/hidden-metrics/ response — the coach’s hidden
metric-group set for one (activity, exercise) pair (#424).
Server-side curation moved off device-local localStorage so the
server-rendered session PDF prints the same visible set the coach
curated in the player. hidden lists metric group keys (the
groupLeftRight output — a metric key for singletons, a bilateral
stem for L/R pairs), not raw metric keys.
object
Examplegenerated
{ "activity": "example", "exercise": "example", "hidden": [ "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).
Examplegenerated
{ "detail": "example"}