v2 Metrics Get - TrainingPeaks/PartnersAPI GitHub Wiki
Endpoint:
- /v2/metrics/{metricId:string}
- HTTP Method: GET
- Required Scope: metrics:read
Example:
Testing:
https://api.sandbox.trainingpeaks.com/v2/metrics/B3AADF1C-1380-4FFE-93D5-E67C3A3491A4
Production:
https://api.trainingpeaks.com/v2/metrics/B3AADF1C-1380-4FFE-93D5-E67C3A3491A4
Example:
{
"MetricId":"B3AADF1C-1380-4FFE-93D5-E67C3A3491A4",
"AthleteId":123456789,
"DateTime": "2020-06-01T06:12:34",
"UploadClient":"testapplication",
"WeightInKilograms":68.1,
"HRV":84.1,
"Steps":12345,
"Stress":"Low",
"SleepQuality":"Good"
}
Note:
- MetricId: string, unique id for the metrics
- AthleteId: int, TrainingPeaks athlete identifier
- DateTime: Local DateTime as recorded, without timezone qualification; truncated to the minute
- UploadClient: string
- Metrics: one or more non-null values
Note: Not every field will be returned for every metric, and new fields may be added in the future. It is recommended to check that a key exists before accessing its value.