Read the active challenge catalogue for the client selected by the request host.
/api/challengesReturns the challenge objects visible to the client selected from the request
host. This route does not take a clientId query parameter.
Send one of the credentials described in Activities authentication:
ClientToken: <client-token>or:
Authorization: Bearer <firebase-id-token>The successful response is a 200 JSON object:
{
"data": [
{
"id": "challenge-123",
"title": {
"en": "Push-up challenge",
"zh-Hant": "伏地挺身挑戰",
"zh-Hans": "俯卧撑挑战"
},
"description": {
"en": "Complete as many repetitions as you can."
},
"videoUrl": "https://cdn.example.com/challenge.mp4",
"thumbnailUrl": "https://cdn.example.com/challenge.jpg",
"algo": "pose-checkpoints",
"type": "timeAttack",
"repForMaxScore60Seconds": 50,
"durationForMaxScore30Reps": 60,
"caloriesBurnedPerRep": 0.5,
"order": 1,
"status": "active"
}
]
}title is a multilingual value with an English string and locale fallbacks.
description and the remaining fields are optional unless shown as required
by the challenge data model. The supported challenge algorithm values are
pose-checkpoints and jump-counting; challenge types are endurance
and timeAttack.
The challenge model also supports repCounterConfig, createdAt, and
updatedAt. repForMaxScore60Seconds and
durationForMaxScore30Reps are required in each challenge object. The response
is a catalogue read; creating or editing challenges is not part of this
public guide.
401 indicates missing or invalid authentication.500 with Client ID not found indicates that the request host did not
resolve to a client.500 responses indicate a server or data-store failure.