---
title: "Get workout history list"
method: GET
path: "/api/health/workout-history"
tags: ["Health"]
---

# Get workout history list

`GET /api/health/workout-history`

## Request

- Base URL: `https://api.hiyd.ai`
- URL: `https://api.hiyd.ai/api/health/workout-history`
- Auth: HTTP bearer

Returns the user's most recent workouts grouped by calendar date, newest date first, with the single most recent workout repeated as `last_routine`. `grouped_workouts` is always an array; it is empty (and `last_routine` is null, `total_workouts` is 0) when the user has no workouts.

## Query parameters

- `limit` integer

## Response `200`

Workout history retrieved successfully

- object
  - `last_routine` object, nullable: Most recent workout, or null when there are none
    - `id` string
    - `workout_type` string: Display name, e.g. Running
    - `workout_type_raw` string: Stored type, e.g. running
    - `calories_burned` integer
    - `duration_minutes` integer
    - `duration_formatted` string
    - `active_seconds` integer, nullable: Exact active time in seconds (pauses excluded) for an app-recorded workout, else null
    - `start_time` string, date-time
    - `time_ago` string
  - `grouped_workouts` object[]: One entry per calendar date, newest first
    - `date` string
    - `date_label` string
    - `workouts` object[]
      - `id` string
      - `workout_type` string
      - `workout_type_raw` string
      - `calories_burned` integer
      - `duration_minutes` integer
      - `duration_formatted` string
      - `distance_meters` number: 0 when the workout has no distance
      - `distance_formatted` string, nullable
      - `start_time` string, date-time
      - `time_ago` string
  - `total_workouts` integer: Number of workouts returned, 0 when none

---

[API](https://skmtc.dev/hiyd/apis/hiyd-backend-api.md) - [All operations](https://skmtc.dev/hiyd/apis/hiyd-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hiyd/apis/hiyd-backend-api/revisions/23598d347e1b?raw)
