Workouts Get - TrainingPeaks/PartnersAPI GitHub Wiki

Workouts

Returns a list of workouts for the date range from an athlete’s calendar. This method will be made available to services and apps that upload workout files and are required to verify that a duplicate workout does not already exist in the athlete’s account.

  • Resource endpoint: /v2/workouts/{start date}/{end date}
  • HTTP Method: GET
  • OAuth Scope Required: workouts:read
  • Input:
    • Start date in local time. Required.
    • End date in local time. Required.
  • Optional Query String Parameters:
    • includeDescription={bool}
      • Include the workout Description

Note: The end date can not be more than 365 days in the future; and the delta between the start date and end data can not be more than 45 days.

Example:

Testing:
https://api.sandbox.trainingpeaks.com/v2/workouts/2017-01-01/2017-01-04

Production:
https://api.trainingpeaks.com/v2/workouts/2017-01-01/2017-01-04

Returns:

An array of workouts, see the Workouts object for a complete list of properties

Example:

[
  {
     "Distance": 100000,
     "Id": 139283664,
     "StartTime": "2014-04-15T12:57:59",
     "TotalTime": 1.25,
     "WorkoutType": "Bike"
  }
]