---
title: "Get Workout Totals"
method: GET
path: "/api/v1/users/{user_id}/events/workouts/totals"
tags: ["External: Events"]
---

# Get Workout Totals

`GET /api/v1/users/{user_id}/events/workouts/totals`

## Request

- Base URL: `https://api.openwearables.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openwearables.io/api/v1/users/{user_id}/events/workouts/totals`
- Auth: OAuth 2 (password, token URL `/api/v1/auth/login`)

Returns the count, duration, energy and distance of the workouts the same filters would list.

Added up in the database, so it covers every matching workout however many
there are, without paging through them.

## Path parameters

- `user_id` string, uuid, required

## Query parameters

- `start_date` string, date-time, required: ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp in seconds. Date-only strings (e.g. `2023-11-07`) are also accepted and cover the whole day, so a date-only range includes both boundary days.
- `end_date` string, date-time, required: ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp in seconds. Date-only strings (e.g. `2023-11-07`) are also accepted and cover the whole day, so a date-only range includes both boundary days.
- `record_type` string, nullable
- `type` 'running' | 'trail_running' | 'treadmill' | 'walking' | 'hiking' | 'mountaineering' | 'cycling' | 'mountain_biking' | 'indoor_cycling' | 'cyclocross' | 'swimming' | 'pool_swimming' | 'open_water_swimming' | 'strength_training' | 'cardio_training' | 'fitness_equipment' | 'elliptical' | 'rowing_machine' | 'stair_climbing' | 'yoga' | 'pilates' | 'stretching' | 'meditation' | 'cross_country_skiing' | 'alpine_skiing' | 'backcountry_skiing' | 'downhill_skiing' | 'snowboarding' | 'snowshoeing' | 'ice_skating' | 'snowmobiling' | 'winter_sports' | 'snow_sports' | 'rowing' | 'kayaking' | 'canoeing' | 'paddling' | 'stand_up_paddleboarding' | 'surfing' | 'kitesurfing' | 'windsurfing' | 'sailing' | 'water_polo' | 'wakeboarding' | 'water_skiing' | 'boating' | 'water_sports' | 'soccer' | 'basketball' | 'football' | 'american_football' | 'baseball' | 'tennis' | 'badminton' | 'volleyball' | 'handball' | 'rugby' | 'hockey' | 'floorball' | 'lacrosse' | 'cricket' | 'squash' | 'table_tennis' | 'padel' | 'pickleball' | 'racquetball' | 'racket_sports' | 'boxing' | 'martial_arts' | 'wrestling' | 'fencing' | 'rock_climbing' | 'indoor_climbing' | 'bouldering' | 'trail_hiking' | 'orienteering' | 'archery' | 'fishing' | 'hunting' | 'paragliding' | 'parkour' | 'golf' | 'skating' | 'inline_skating' | 'skateboarding' | 'horseback_riding' | 'gymnastics' | 'bowling' | 'curling' | 'disc_sports' | 'triathlon' | 'multisport' | 'motorcycling' | 'motor_sports' | 'dance' | 'aerobics' | 'group_exercise' | 'e_biking' | 'virtual_activity' | 'diving' | 'snorkeling' | 'walking_fitness' | 'casual_walking' | 'transition' | 'team_sports' | 'para_sports' | 'play' | 'wheelchair' | 'recovery' | 'gaming' | 'chores' | 'lifestyle' | 'work' | 'operations' | 'generic' | 'other' | 'sport': Unified workout/activity types for Polar, Suunto, and Garmin. Based on FIT SDK sport types and common activities across platforms. Excludes branded/niche activities (e.g., LES MILLS classes, specific dance types).
- `provider` 'apple' | 'samsung' | 'garmin' | 'health_connect' | 'google_health' | 'polar' | 'suunto' | 'whoop' | 'strava' | 'oura' | 'fitbit' | 'ultrahuman' | 'sensorbio' | 'withings' | 'unknown' | 'internal': Supported data providers.
- `source` string, nullable
- `device_model` string, nullable
- `data_source_id` string, uuid, nullable

## Headers

- `X-Open-Wearables-API-Key` string, nullable

## Response `200`

Successful Response

- WorkoutTotals: Workouts matching a filter, added up in the database rather than paged.
  - `count` integer, required: Workouts that match the filters
  - `duration_seconds` integer, required: Sum of their durations
  - `calories_kcal` number, nullable: Sum of reported energy burned; null when none reported any
  - `distance_meters` number, nullable: Sum of reported distance; null when none reported any

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-05** `c4e4e974ed37`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openwearables/apis/open-wearables-api/changes/api/v1/users/:user_id/events/workouts/totals/get.md)

---

[API](https://skmtc.dev/openwearables/apis/open-wearables-api.md) · [All operations](https://skmtc.dev/openwearables/apis/open-wearables-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openwearables/apis/open-wearables-api/revisions/c9016a165d04?raw)
