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
fromstringNoStart date YYYY-MM-DD
tostringNoEnd date YYYY-MM-DD

HTTP 200

[
{
"id": "uuid",
"metric": "ftp",
"value": 265,
"effective_from": "2025-01-15",
"source": "auto",
"notes": null,
"created_at": "2025-01-15T10:30:00Z"
},
{
"id": "uuid",
"metric": "ftp",
"value": 258,
"effective_from": "2024-09-01",
"source": "manual",
"notes": "Post-summer ramp test",
"created_at": "2024-09-01T09:00:00Z"
}
]
Terminal window
# All FTP history
curl "https://mydatafor.life/api/mcp/thresholds?metric=ftp" \
-H "Authorization: Bearer $FITREPO_API_KEY"
# All thresholds, all time
curl "https://mydatafor.life/api/mcp/thresholds" \
-H "Authorization: Bearer $FITREPO_API_KEY"