Workouts Get Changed - TrainingPeaks/PartnersAPI GitHub Wiki

Workouts

Returns a list of workouts that have been updated since the date provided. This will return two lists, one of deleted workout ids and another of workouts that have been modified.

  • Resource endpoint: /v2/workouts/changes?date={date}&pageSize=50&page=0
  • HTTP Method: GET
  • OAuth Scope Required: workouts:read
  • Query String parameters:
    • date: in UTC. Required.
      • Note: The minimum date is 2000-01-01, any date before this will return an error
    • pageSize: (int) number of results to return per request. Max 100.
    • page: (int) zero based index for paging.
    • workoutTypeFilter: (string) filter to specific workout type, see Workouts object for workout types.
    • includeDescription={bool}
      • Include the workout Description

Example:

Testing:
https://api.sandbox.trainingpeaks.com/v2/workouts/changed?date=2017-10-01&pageSize=50&page0

Production:
https://api.trainingpeaks.com/v2/workouts/changed?date=2017-10-01&pageSize=50&page0

Returns:

An array of deleted workout ids and an array of updated workouts, see the Workouts object for a complete list of properties

Example:

{
  "Deleted":
  [
    123456789
  ],
  "Modified":
  [
    {
       "LastModifiedDate":"2017-09-25T17:31:28.9428265Z",
       "Id":234567890,
       "AthleteId":12345,
       "WorkoutType":"Bike",
       "Title":null,
       "WorkoutDay":"2017-09-13T00:00:00"
     }
  ]
}