Workouts Get Changes - TrainingPeaks/PartnersAPI GitHub Wiki

[Deprecated]

replaced by Workouts: Get Changed

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/{since_date}?pageSize=50&page=0
  • HTTP Method: GET
  • OAuth Scope Required: workouts:read
  • Input:
    • Since date in local time. Required.
      • Note: The minimum date is 2000-01-01, any date before this will return an error
  • Query String parameters:
    • 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.

Example:

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

Production:
https://api.trainingpeaks.com/v2/workouts/changes/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"
     }
  ]
}