Time Series
curl --request GET \
  --url https://app-api.spikeapi.com/v3/queries/timeseries \
  --header 'Authorization: Bearer <token>'
{
  "device_types": [
    "unknown"
  ],
  "durations": [
    123
  ],
  "from_timestamp": "2006-01-02T00:00:00Z",
  "metric": "heartrate_max",
  "offsets": [
    123
  ],
  "provider_sources": [
    "apple_healthkit_sample"
  ],
  "providers": [
    "strava"
  ],
  "record_ids": [
    "877e0054-287f-45b4-a036-6a4c69114eaf"
  ],
  "to_timestamp": "2006-01-02T00:00:00Z",
  "values": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

from_timestamp
string<date-time>

Start time of the query range in UTC

Examples:

"2006-01-02T15:04:05"

"2006-01-02T15:04:05Z"

to_timestamp
string<date-time>

End time of the query range in UTC

Examples:

"2006-01-02T15:04:05"

"2006-01-02T15:04:05Z"

metric
enum<string>
required

The metric you want to query

Available options:
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,
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
providers
enum<string>[]
include_record_ids
boolean

Whether to include the record IDs in the response

merge_method
enum<string>

Method to merge data

Available options:
select_best_weighted_source,
select_highest_coverage_source,
select_most_granular_source,
select_highest_priority_source_type,
merge_maximize_coverage,
merge_maximize_granularity,
merge_maximize_weighted_coverage,
merge_all_samples
device_types
enum<string>[]

Device types to include

Response

200
application/json

OK

The response is of type object.