---
title: "Time Series Data split by provider source"
method: GET
path: "/queries/timeseries/split"
tags: ["Queries / Time Series"]
---

# Time Series Data split by provider source

`GET /queries/timeseries/split`

This endpoint returns time series data separated by provider source, allowing you to see data from each source individually without merging. Each time series entry contains arrays of `offsets`, `durations`, and `values` that are aligned by index.

<Note>
The arrays `offsets`, `durations`, and `values` will all be of the same length. This alignment is crucial for interpreting the data correctly.
</Note>

## Response Structure

The response contains a `timeseries` array where each entry represents data from a specific provider source, including:
- **Provider information**: The specific provider slug
- **Division type**: The type of data division (sample, activity, etc.)
- **Source details**: Device manufacturer, model, and other source information
- **Data arrays**: Offsets, durations, and values for the time series

## Request Example

```json
{
  "from_timestamp": "2024-01-01T00:00:00Z",
  "to_timestamp": "2024-01-02T00:00:00Z",
  "metric": "heartrate",
  "include_record_ids": true
}
```

## Response Example

```json
{
  "timeseries": [
    {
      "metric": "heartrate",
      "start_at": "2024-01-01T00:00:00Z",
      "offsets": [43200000, 46800000],
      "durations": [2400000, 600000],
      "values": [71, 76],
      "provider": "apple",
      "division_type": "sample",
      "record_ids": ["ff000000-0000-0000-0000-000000000000"],
      "source": {
        "device_manufacturer": "Apple",
        "device_model": "iPhone 15"
      }
    }
  ]
}
```

## Query parameters

- `from_timestamp` string, date-time — Start time of the query range in UTC, inclusive
- `to_timestamp` string, date-time — End time of the query range in UTC, non-inclusive
- `metric` 'heartrate_max' | 'heartrate_min' | 'heartrate_zone0_duration' | 'heartrate_zone1_duration' | 'heartrate_zone2_duration' | 'heartrate_zone3_duration' | 'heartrate_zone4_duration' | 'heartrate_zone5_duration' | 'heartrate' | 'heartrate_resting' | 'heartrate_resting_min' | 'heartrate_resting_max' | 'hrv_rmssd' | 'hrv_sdnn' | 'elevation_max' | 'elevation_min' | 'elevation_gain' | 'elevation_loss' | 'ascent' | 'descent' | 'calories_burned_active' | 'calories_burned_basal' | 'calories_burned' | 'calories_intake' | 'steps' | 'floors_climbed' | 'distance' | 'distance_walking' | 'distance_cycling' | 'distance_running' | 'distance_wheelchair' | 'distance_swimming' | 'speed' | 'speed_max' | 'speed_min' | 'air_temperature_max' | 'air_temperature' | 'air_temperature_min' | 'spo2' | 'spo2_max' | 'spo2_min' | 'breathing_rate' | 'breathing_rate_min' | 'breathing_rate_max' | 'longitude' | 'latitude' | 'elevation' | 'duration_active' | 'swimming_lengths' | 'swimming_distance_per_stroke' | 'sleep_efficiency' | 'sleep_duration' | 'sleep_duration_deep' | 'sleep_duration_light' | 'sleep_duration_rem' | 'sleep_duration_awake' | 'bedtime_duration' | 'sleep_interruptions' | 'sleep_duration_nap' | 'sleep_score' | 'sleep_breathing_rate' | 'sleep_breathing_rate_min' | 'sleep_breathing_rate_max' | 'sleep_latency' | 'wakeup_latency' | 'cadence' | 'cadence_min' | 'cadence_max' | 'pace' | 'body_mass_index' | 'weight' | 'height' | 'vo2max' | 'body_temperature' | 'body_temperature_max' | 'body_temperature_min' | 'basal_body_temperature' | 'basal_body_temperature_max' | 'basal_body_temperature_min' | 'skin_temperature' | 'skin_temperature_max' | 'skin_temperature_min' | 'sleep_skin_temperature_deviation' | 'ecg_voltage' | 'ecg_rri' | 'body_fat' | 'body_fat_min' | 'body_fat_max' | '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
- `providers` string[]
- `include_record_ids` boolean — Whether to include the record IDs in the response
- `device_types` string[] — Device types to include in the statistics

## Response `200`

OK

- TimeseriesSplitQueryOutput
  - `from_timestamp` string, date-time
  - `timeseries` TimeseriesSplitQueryOutputEntry[], nullable, required
    - `device_type` 'unknown' | 'phone' | 'watch' | 'scale' | 'ring' | 'head_mounted' | 'fitness_band' | 'chest_strap' | 'smart_display' | 'accessory' — The device type for these timeseries
    - `division_type` 'session' | 'sample' | 'lap' | 'split' | 'segment' | 'sleep_stage' — The division type for these timeseries
    - `durations` integer[], nullable — Duration of each timeseries entry in milliseconds
    - `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 type for these timeseries
    - `offsets` integer[], nullable — Millisecond offsets from the start_at timestamp
    - `provider` string — The provider slug for these timeseries
    - `record_ids` string[], nullable — IDs of the records containing these timeseries
    - `source` QueryOutputSourceInfo
      - `device_manufacturer` string
      - `device_model` string
      - `device_product` string
      - `device_version` string
      - `source_bundle_identifier` string
      - `source_os_version` string
      - `source_product` string
      - `source_version` string
    - `start_at` string, date-time, required — The base timestamp from which offsets are calculated
    - `values` MetricValue[], nullable — The actual metric values for each timeseries entry
  - `to_timestamp` string, date-time

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.dev/spikeapi/apis/application-user-api.md) · [All operations](https://skmtc.dev/spikeapi/apis/application-user-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/spikeapi/application-user-api/revisions/637338fb0c9d/schema)
