Get the current training load
const url = 'http://localhost:8080/api/v1/metrics/training-load';const options = {method: 'GET', 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 GET \ --url http://localhost:8080/api/v1/metrics/training-load \ --header 'Authorization: Bearer <token>'Returns today’s training load metrics
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The current training load.
object
Chronic Training Load (fitness), the 42-day weighted average of the daily load.
Acute Training Load (fatigue), the 7-day weighted average of the daily load.
Training Stress Balance (form), CTL minus ATL.
object
POSSIBLE_DETRAINING above 25, PEAK_FRESH from 10 to 25, SLIGHTLY_FRESH from 0 to 10, NEUTRAL from -10 to 0, ACCUMULATED_FATIGUE from -30 to -10 and OVER_FATIGUED below -30.
Acute:Chronic Workload Ratio, ATL divided by CTL.
object
HIGH_RISK above 1.3, LOW_RISK from 0.8 to 1.3 and LOW_TRAINING_LOAD below 0.8.
The total training load (TRIMP) of the last 7 days.
How evenly the load of the last 7 days was spread; higher means less variation.
The weekly load multiplied by its monotony.
The number of days without an activity in the last 7 days, today included.
Example
{ "ctl": 54.2, "atl": 61, "tsb": { "value": -6.8, "status": "POSSIBLE_DETRAINING" }, "acRatio": { "value": 1.12, "status": "HIGH_RISK" }, "weeklyTrimp": 420, "monotony": 1.4, "strain": 590, "restDaysLast7Days": 2}The Authorization header was missing, malformed, or did not match the configured key.
Every error uses this shape.
object
A stable, machine readable code.
Examples
{ "error": "invalid_token", "message": "A valid API token is required. Send it in the Authorization header as a Bearer token."}