Get trend
get_trendSee how a Garmin health metric like steps or sleep changed over a date range, with averages, high and low points, and the overall change.
Instructions
How one metric moved over a range, with average, extremes and change.
Metrics: steps, resting_hr, sleep (hours), sleep_score, hrv, readiness (the morning score), stress (the day's average), body_battery (the day's high), weight, body_fat, vo2max (running), vo2max_cycling. Up to two months comes back daily, up to a year weekly, longer monthly. Ranges are limited to two years. Steps, sleep, sleep_score, stress and body_battery are fetched four weeks per Garmin request, so a year of one is about 14 requests; hrv, readiness and resting_hr a year per request; weight, body_fat and VO2 max one request.
For one day use get_day_summary or that metric's own tool; for every weigh-in rather than one a day, list_weigh_ins.
The summary gives days_with_data (periods_with_data for VO2 max, which Garmin groups itself), the average, min and max of the days, the first and last day, and change: the last whole period's average minus the first whole period's, so a week the range cuts short does not count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Last day, inclusive. | |
| start | Yes | First day, inclusive. | |
| metric | Yes | One of the metrics listed above. | |
| aggregation | No | day, week or month. Chosen from the range when left out. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| unit | Yes | ||
| start | Yes | ||
| metric | Yes | ||
| points | No | ||
| summary | No | ||
| aggregation | Yes |