- Home
- Wearables
- Lab Testing
- API Reference
- Event Catalog
- Changelog
Users
Introspection
Orders
At-home Phlebotomy
Tests
Results
Health Insurance
Vitals
Body
Activity
Wellness
Nutrition
Core
Lab Testing
Timeseries Data
Summary
Get Daily workout for user_id
API key based authentication
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
curl --request GET \
--url {{BASE_URL}}/v2/summary/workouts/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"workouts": {
"id": "f09c1083-701f-4030-b43d-e48825377de9",
"average_hr": 100,
"max_hr": 190,
"distance": 1700,
"calendar_date": "2022-08-04",
"time_start": "2022-08-04T11:42:44.864554+00:00",
"time_end": "2022-08-04T12:42:44.864576+00:00",
"timezone_offset": 2400,
"calories": 300,
"sport": {
"id": 1,
"name": "football"
},
"source": {
"name": "Strava",
"slug": "strava",
"logo": "https://logo_url.com"
},
"hr_zones": [100, 90, 10, 10, 200],
"user_id": "701830a9-bd50-48d5-91e5-8c7485d95c12",
"moving_time": 100,
"total_elevation_gain": 10,
"elev_high": 20.2,
"elev_low": -10.2,
"average_speed": 4.2,
"max_speed": 7.8,
"average_watts": 100,
"device_watts": 80,
"max_watts": 200,
"weighted_average_watts": 250,
"map": {
"summary_polyline": "agn~Ftb{uOvr@daBunBjdBkHwiD????"
}
},
"title": "Workout Data"
}
Authorizations
API key based authentication
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
Average heart rate during workout::bpm
Average speed during workout in m/s::meters/sec
Average watts burned during exercise::watts
Date of the workout summary in the YYYY-mm-dd format. This generally matches the workout start date.
Calories burned during the workout::kCal
Watts burned during exercise::watts
Distance travelled during workout::meters
Highest point of elevation::meters
Lowest point of elevation::meters
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
Map of workouts encoded as polyline
Max heart rate during workout::bpm
Max speed during workout in m/s::meters/sec
Max watts burned during exercise::watts
Time spent active during the workout::seconds
Provider ID given for that specific workout
Source the data has come from.
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. Subject to removal after 1 Jan 2024.
Provider slug. e.g., oura
, fitbit
, garmin
.
Deprecated. Use provider
instead. Subject to removal after 1 Jan 2024.
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
Sport's name
Sport's name
Slug for designated sport
End time of the workout::time
Start time of the workout::time
Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds
Title given for the workout
Elevation gain during the workout::meters
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.
Weighted average watts burned during exercise::watts
curl --request GET \
--url {{BASE_URL}}/v2/summary/workouts/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"workouts": {
"id": "f09c1083-701f-4030-b43d-e48825377de9",
"average_hr": 100,
"max_hr": 190,
"distance": 1700,
"calendar_date": "2022-08-04",
"time_start": "2022-08-04T11:42:44.864554+00:00",
"time_end": "2022-08-04T12:42:44.864576+00:00",
"timezone_offset": 2400,
"calories": 300,
"sport": {
"id": 1,
"name": "football"
},
"source": {
"name": "Strava",
"slug": "strava",
"logo": "https://logo_url.com"
},
"hr_zones": [100, 90, 10, 10, 200],
"user_id": "701830a9-bd50-48d5-91e5-8c7485d95c12",
"moving_time": 100,
"total_elevation_gain": 10,
"elev_high": 20.2,
"elev_low": -10.2,
"average_speed": 4.2,
"max_speed": 7.8,
"average_watts": 100,
"device_watts": 80,
"max_watts": 200,
"weighted_average_watts": 250,
"map": {
"summary_polyline": "agn~Ftb{uOvr@daBunBjdBkHwiD????"
}
},
"title": "Workout Data"
}