List Samples
Samples represent raw or minimally processed data points collected over time. They are typically used to capture detailed information about specific metrics, such as steps taken, heart rate, or other health-related metrics. Unlike aggregated statistics, samples provide a granular view of the data, allowing for detailed analysis and insights into patterns or trends over time.
Sample Grouping
Samples would be grouped by the metric type, provider source, and source info, you can either choose to select the best source for you or pass the only_best_source
flag to the query which will return only the best source for each metric, the best source is selected based on granularity.
It is important to note that the arrays offsets_ms
, durations_ms
, and values
will all be of the same length. This ensures that each offset has a corresponding duration and value, allowing for a consistent and accurate representation of the sampled data over time. This alignment is crucial for interpreting the data correctly and performing any subsequent analysis or processing.
Request Example
{
"from_timestamp": "2024-01-01T00:00:00Z",
"to_timestamp": "2024-01-02T00:00:00Z",
"metrics": ["steps"], // At least one metric is required
"include_record_ids": true, // Include record IDs in the response
"only_best_source": false // Optional: include only the best source
}
Response Example
{
"samples": [
{
"metric": "steps",
"provider": "garmin",
"provider_source_id": 512,
"source_info": {
"device_manufacturer": "Garmin",
"device_model": "Forerunner 955"
},
"start_at": "2024-01-01T00:00:00Z",
"offsets_ms": [10000, 20000],
"durations_ms": [10000, 10000],
"values": [100, 100],
"record_ids": ["ff000000-0000-0000-0000-000000000000"]
}
{
"metric": "steps",
"provider": "apple",
"provider_source_id": 212,
"source_info": {
"bundle_identifier": "com.garmin.connectmobile",
"os_version": "11.1.0",
"product": "ConnectIQ",
"version": "5.1.0"
},
"start_at": "2024-01-01T00:00:00Z",
"offsets_ms": [10000, 20000],
"durations_ms": [10000, 10000],
"values": [100, 100],
"record_ids": ["ff000000-0000-0000-0000-000000000000"]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Start time of the query range in UTC
"2006-01-02T15:04:05"
"2006-01-02T15:04:05Z"
End time of the query range in UTC
"2006-01-02T15:04:05"
"2006-01-02T15:04:05Z"
An array of metrics you want to query
Provider slugs
Whether to include the record IDs in the response
Whether to include only the best source in the response
Response
OK
The response is of type object
.