Skip to content

GET /api/mcp/thresholds

GET /api/mcp/thresholds
Authorization: Bearer <api-key>

Returns threshold history ordered by effective_from descending (most recent first). See Thresholds for full documentation.

ParameterTypeRequiredDescription
metricstringNoftp or lthr — omit to return all metrics

HTTP 200

{
"thresholds": [
{
"metric": "ftp",
"value": 265,
"effective_from": "2025-01-15",
"source": "auto",
"notes": null
},
{
"metric": "ftp",
"value": 258,
"effective_from": "2024-09-01",
"source": "manual",
"notes": "Post-summer ramp test"
}
],
"note": "Use effective_from to find the threshold active on any given date."
}

To find the FTP active on a specific date, filter thresholds for metric = "ftp" and take the entry with the greatest effective_from that is still ≤ that date.

Terminal window
# All FTP history
curl "https://mydatafor.life/api/mcp/thresholds?metric=ftp" \
-H "Authorization: Bearer $FITREPO_API_KEY"
# All thresholds, all metrics
curl "https://mydatafor.life/api/mcp/thresholds" \
-H "Authorization: Bearer $FITREPO_API_KEY"