Timeline¶
- GET /api/timeline¶
Get workouts visible to authenticated user.
Scope:
workouts:read
Example requests:
without parameters:
GET /api/timeline HTTP/1.1
with some query parameters:
GET /api/timeline?page=2 HTTP/1.1
Example responses:
returning at least one workout:
HTTP/1.1 200 OK Content-Type: application/json { "data": { "workouts": [ { "ascent": null, "ave_speed": 10.0, "bounds": [], "creation_date": "Sun, 14 Jul 2019 13:51:01 GMT", "descent": null, "description": null, "distance": 10.0, "duration": "0:17:04", "equipments": [], "id": "kjxavSTUrJvoAh2wvCeGEF", "map": null, "max_alt": null, "max_speed": 10.0, "min_alt": null, "modification_date": null, "moving": "0:17:04", "next_workout": 3, "notes": null, "pauses": null, "previous_workout": null, "records": [ { "id": 4, "record_type": "MS", "sport_id": 1, "user": "admin", "value": 10.0, "workout_date": "Mon, 01 Jan 2018 00:00:00 GMT", "workout_id": "kjxavSTUrJvoAh2wvCeGEF" }, { "id": 13, "record_type": "HA", "sport_id": 1, "user": "Sam", "value": 43.97, "workout_date": "Sun, 07 Jul 2019 08:00:00 GMT", "workout_id": "hvYBqYBRa7wwXpaStWR4V2" }, { "id": 3, "record_type": "LD", "sport_id": 1, "user": "admin", "value": "0:17:04", "workout_date": "Mon, 01 Jan 2018 00:00:00 GMT", "workout_id": "kjxavSTUrJvoAh2wvCeGEF" }, { "id": 2, "record_type": "FD", "sport_id": 1, "user": "admin", "value": 10.0, "workout_date": "Mon, 01 Jan 2018 00:00:00 GMT", "workout_id": "kjxavSTUrJvoAh2wvCeGEF" }, { "id": 1, "record_type": "AS", "sport_id": 1, "user": "admin", "value": 10.0, "workout_date": "Mon, 01 Jan 2018 00:00:00 GMT", "workout_id": "kjxavSTUrJvoAh2wvCeGEF" } ], "segments": [], "sport_id": 1, "title": null, "user": "admin", "weather_end": null, "weather_start": null, "with_gpx": false, "workout_date": "Mon, 01 Jan 2018 00:00:00 GMT" } ] }, "status": "success" }
returning no workouts
HTTP/1.1 200 OK Content-Type: application/json { "data": { "workouts": [] }, "status": "success" }
- Query Parameters:
page (integer) – page if using pagination (default: 1)
- Request Headers:
Authorization – OAuth 2.0 Bearer Token
- Status Codes:
200 OK –
success
provide a valid auth token
signature expired, please log in again
invalid token, please log in again
you do not have permissions
you do not have permissions, your account is suspended
500 Internal Server Error –
error, please try again or contact the administrator