v1
latestOpenAPI 3.1.02026-07-136587849.3 KBQueries / Time Series
Get Samples Time Series
This endpoint returns only sample data points (individual measurements) from time series data, excluding any aggregated data. Uses the merge_all_samples merge method to combine data from multiple sources while preserving individual sample points.
<Note> The arrays `offsets`, `durations`, and `values` will all be of the same length. This alignment is crucial for interpreting the data correctly. </Note>Data Filtering
This endpoint returns only sample data points, meaning:
- Individual measurements with zero duration (instantaneous readings)
- No aggregated data (daily summaries, hourly averages, etc.)
- Data is merged from all available sources using the merge_all_samples method
Request Example
{
"from_timestamp": "2024-01-01T00:00:00Z",
"to_timestamp": "2024-01-02T00:00:00Z",
"metric": "heartrate",
"include_record_ids": true
}
Response Example
{
"metric": "heartrate",
"start_at": "2024-01-01T00:00:00Z",
"offsets": [0, 60000, 120000],
"values": [100, 150, 200],
"record_ids": ["ff000000-0000-0000-0000-000000000000"],
"providers": ["apple"],
"provider_sources": ["apple_healthkit_sample"]
}
<Note>
For sample data, the `durations` field is omitted from the response since all sample points have zero duration.
</Note> get/queries/timeseries/samples
Query parameters
from_timestampstring date-time
Start time of the query range in UTC, inclusive
Example:2006-01-02T15:04:05
Start time of the query range in UTC, inclusive
to_timestampstring date-time
End time of the query range in UTC, non-inclusive
Example:2006-01-02T15:04:05
End time of the query range in UTC, non-inclusive
metric'heartrate' | 'heartrate_resting' | 'hrv_rmssd' | 'hrv_sdnn' | 'floors_climbed' | 'speed' | 'air_temperature' | 'spo2' | 'breathing_rate' | 'elevation' | 'sleep_breathing_rate' | 'cadence' | 'body_mass_index' | 'weight' | 'height' | 'vo2max' | 'body_temperature' | 'basal_body_temperature' | 'skin_temperature' | 'body_fat' | 'blood_pressure_systolic' | 'blood_pressure_systolic_min' | 'blood_pressure_systolic_max' | 'blood_pressure_diastolic' | 'blood_pressure_diastolic_min' | 'blood_pressure_diastolic_max' | 'body_bone_mass' | 'glucose' | 'power' | 'power_max' | 'duration_low_intensity' | 'duration_moderate_intensity' | 'duration_high_intensity' required
The metric you want to query
The metric you want to query
providersstring[]
include_record_idsboolean
Whether to include the record IDs in the response
Whether to include the record IDs in the response
Response
OK
Example response
{
"from_timestamp": "2006-01-02T00:00:00Z",
"providers": [
"strava"
],
"record_ids": [
"12345678-1234-abcd-4321-abcdef123456"
],
"to_timestamp": "2006-01-02T00:00:00Z"
}