Across-session trends for a public share token (redacted)
const url = 'http://localhost:8000/api/shared/example/trends/';const options = {method: 'GET'};
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/shared/example/trends/Public, token-gated across-session trends for the shared session (#424) — the same per-metric trajectories the coach sees, but redacted: every session_id is dropped (a one-session share link can’t be used to enumerate or open the client’s OTHER sessions) and the internal client_id is omitted. No curation is applied — the public share renders the full metric set, so its trends cover the same set. Window defaults to a year; narrow with ?range=30d or ?from=&to=. 404 unknown token, 410 expired share.
Auth: none — the token in the path is the credential.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Custom window start.
7d/14d/30d/90d/365d (default 365d).
Custom window end.
Responses
Section titled “Responses”Shape of GET /api/shared/{token}/trends/ — redacted across-session
trends for a public one-session share. No session_id / client_id.
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
object
One across-session point on a public share — drill-in identifiers
(session_id) intentionally dropped.
object
Example
{ "activity": "running"}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 — Unknown share token
{ "detail": "share_not_found"}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
410 — Share link expired
{ "detail": "share_expired"}