get_activity_streams
Retrieve activity streams from Intervals.icu by sample index using a bounded preview or custom range. Choose stream types, detect truncation, and use snapshot IDs to continue consistently with larger transfers.
Instructions
Read activity streams by sample index with bounded preview or range.
range uses half-open sample indices [start_index, end_index);
those indices are not elapsed seconds and a single range is limited to
10,000 samples. Use export_activity_data plus get_artifact_chunk for
a larger complete transfer. preview returns all samples
for short arrays and only the first and last five samples for longer
arrays, reporting truncation only when samples were omitted. Missing
stream types, missing/null primary arrays, ambiguous or unavailable time axes, and
unequal lengths are explicit warnings. Duplicate and custom upstream
streams are retained in order, and no primary data array is invented
for a data2-only stream. The 1/min cadence unit is a display hint when
the source did not declare a unit; Ride commonly
means revolutions per minute, while running conventions depend on the
device and upstream field, with no x2 conversion. alignment.quality
describes array-length alignment only; it does not assert monotonic,
regular, or non-null time values. The snapshot hashes the returned
payload for this selection, so a continuation must keep the same activity
and stream_types.
Respiratory fields: tidal_volume = VT (volume per breath, not VT1/VT2), tidal_volume_min = VE (minute ventilation), respiration = BR (breaths/min). When sourced from Tymewear, VT uses relative i.u. and VE relative vol/min, not calibrated liters. Do not divide VT by 100 or 1000. The response adds conditional documentation in provenance.respiratory_interpretation; original samples and source unit labels are preserved. Use get_metric_definitions and get_custom_items to check mappings and units.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | preview | |
| api_key | No | ||
| end_index | No | ||
| activity_id | Yes | ||
| start_index | No | ||
| stream_types | No | ||
| expected_snapshot_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| query | No | ||
| source | Yes | ||
| status | Yes | ||
| coverage | Yes | ||
| warnings | No | ||
| pagination | No | ||
| request_id | No | ||
| schema_version | No | 1.0 |