Sleep
Sleep Cycle
Meal
Workouts
Profile
Activity
Body
Menstrual Cycle
Electrocardiogram
Vitals Timeseries
Activity Timeseries
Wellness Timeseries
Diary Timeseries
Nutrition Timeseries
Summary
Get workout summary for user_id
curl --request GET \
--url {{BASE_URL}}/v2/summary/workouts/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"workouts": [
{
"average_hr": 100,
"average_speed": 4.2,
"average_watts": 100,
"calendar_date": "2023-02-27",
"calories": 300,
"device_watts": 80,
"distance": 1700,
"elev_high": 20.2,
"elev_low": -10.2,
"hr_zones": [
100,
90,
10,
10,
200
],
"id": "185d0f34-dfc0-429f-84f9-b24030914bdd",
"map": {
"summary_polyline": "agn~Ftb{uOvr@daBunBjdBkHwiD????~Ngn@ha@_N~Ql`@"
},
"max_hr": 190,
"max_speed": 7.8,
"max_watts": 200,
"moving_time": 100,
"source": {
"provider": "strava",
"type": "unknown"
},
"sport": {
"id": 1,
"name": "football"
},
"time_end": "2023-02-27T12:31:24+00:00",
"time_start": "2023-02-27T11:31:24+00:00",
"total_elevation_gain": 10,
"user_id": "1449752e-0d8a-40e0-9206-91ab099b2537",
"weighted_average_watts": 250
}
]
}
curl --request GET \
--url {{BASE_URL}}/v2/summary/workouts/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
Authorizations
Vital Team API Key
Path Parameters
Query Parameters
Provider oura/strava etc
Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00
Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59
Response
User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api.
Date of the workout summary in the YYYY-mm-dd format. This generally matches the workout start date.
Start time of the workout::time
End time of the workout::time
Provider ID given for that specific workout
Source the data has come from.
Provider slug. e.g., oura
, fitbit
, garmin
.
The type of the data source (app or device) by which the summary or the timeseries data were recorded. This defaults to unknown
when Vital cannot extract or infer that information
The identifier of the app which recorded this summary. This is only applicable to multi-source providers like Apple Health and Android Health Connect.
Deprecated. Subject to removal after 1 Jan 2024.
Deprecated. Use provider
instead. Subject to removal after 1 Jan 2024.
Deprecated. Subject to removal after 1 Jan 2024.
Title given for the workout
Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
Average heart rate during workout::bpm
Max heart rate during workout::bpm
Distance travelled during workout::meters
Calories burned during the workout::kCal
Time in seconds spent in different heart rate zones <50%, 50-60%, 60-70%, 70-80%, 80-90%, 90%+. Due to rounding errors, it's possible that summing all values is different than the total time of the workout. Not available for all providers::seconds
Time spent active during the workout::seconds
Elevation gain during the workout::meters
Highest point of elevation::meters
Lowest point of elevation::meters
Average speed during workout in m/s::meters/sec
Max speed during workout in m/s::meters/sec
Average watts burned during exercise::watts
Watts burned during exercise::watts
Max watts burned during exercise::watts
Weighted average watts burned during exercise::watts
Number of steps accumulated during this workout::count
curl --request GET \
--url {{BASE_URL}}/v2/summary/workouts/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"workouts": [
{
"average_hr": 100,
"average_speed": 4.2,
"average_watts": 100,
"calendar_date": "2023-02-27",
"calories": 300,
"device_watts": 80,
"distance": 1700,
"elev_high": 20.2,
"elev_low": -10.2,
"hr_zones": [
100,
90,
10,
10,
200
],
"id": "185d0f34-dfc0-429f-84f9-b24030914bdd",
"map": {
"summary_polyline": "agn~Ftb{uOvr@daBunBjdBkHwiD????~Ngn@ha@_N~Ql`@"
},
"max_hr": 190,
"max_speed": 7.8,
"max_watts": 200,
"moving_time": 100,
"source": {
"provider": "strava",
"type": "unknown"
},
"sport": {
"id": 1,
"name": "football"
},
"time_end": "2023-02-27T12:31:24+00:00",
"time_start": "2023-02-27T11:31:24+00:00",
"total_elevation_gain": 10,
"user_id": "1449752e-0d8a-40e0-9206-91ab099b2537",
"weighted_average_watts": 250
}
]
}