Aggregate Timeseries
aggregate_timeseriesFull Description
Aggregate metric(s) values over a time period by time-bucketing (only supports quantity metrics).
Parameters (3 required, 3 optional)
end_timestringExclusive end of the aggregation window. Provide a naive datetime in the caller's timezone.
metricsarrayOne or more exact HealthKit metric identifiers to aggregate.
start_timestringInclusive start of the aggregation window. Provide a naive datetime in the caller's timezone.
aggstringAggregation function to apply, such as `sum` or `avg`.
sumbucket_minutesintegerBucket size in minutes for time bucketing. Use a smaller value for finer granularity.
5timezonestringOptional timezone offset such as `-04:00`. Omit to use the user's local timezone.
null