Daily totals over a date range
get_daily_rollupAggregate health data by day or N-day windows to reveal trends such as daily steps, average heart rate, or weekly distance over a date range.
Instructions
Aggregated values per day (or per N days) for a data type, e.g. steps per day this week, average heart rate per day, weekly distance. Best tool for trends. Max range is 14 days for heart-rate, active-minutes, total-calories and calories-in-heart-rate-zone, 90 days otherwise.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | Yes | Inclusive last date, YYYY-MM-DD. | |
| dataType | Yes | ||
| startDate | Yes | Date in YYYY-MM-DD (the user's local calendar date). | |
| windowDays | No | Days per bucket. Default 1 (one value per day); 7 gives weekly buckets. |