Metrics Get - TrainingPeaks/PartnersAPI GitHub Wiki

This endpoint is obsolete.

Please see v2/metrics for more details.


Endpoint:

  • /v1/metrics/{metricId:int}
  • HTTP Method: GET
  • Required Scope: metrics:read

Example:

Testing:
https://api.sandbox.trainingpeaks.com/v1/metrics/987654321

Production:
https://api.trainingpeaks.com/v1/metrics/987654321

Example:

{
    "MetricId":987654321,
    "AthleteId":123456789,
    "DateTime":"2016-02-18T22:56:00Z",
    "TimeZoneId":"America/Denver",
    "UploadClient":"testapplication",
    "WeightInKilograms":68.1,
    "HRV":84.1,
    "Steps":12345,
    "Stress":"Low",
    "SleepQuality":"Good"
}

Note:

MetricId: int, unique id for the metrics
AthleteId: int, TrainingPeaks athlete identifier
DateTime: UTC DateTime, truncated to the minute
TimeZoneId: string IANA time zone id, optional
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.