Workouts Get Changed For Athlete - TrainingPeaks/PartnersAPI GitHub Wiki
Workouts
Returns a list of workouts for an athlete 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/{athlete_id}/changed?date={date}&pageSize=50&page=0
- HTTP Method: GET
- OAuth Scope Required: workouts:read
- Input:
- Athlete Id. Required.
- Query String parameters:
- date: in UTC time. Required.
- Note: The minimum date is 2000-01-01T00:00:00Z, 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
- date: in UTC time. Required.
Example:
Testing:
https://api.sandbox.trainingpeaks.com/v2/workouts/123456/changed?date=2017-10-01T00:00:00.00000Z&pageSize=50&page0
Production:
https://api.trainingpeaks.com/v2/workouts/123456/changed?date=2017-10-01T00:00:00.00000Z&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"
}
]
}