Managing Continuous Query
List all Continuous Queries
Aggregation Query
Aggregation Query DSL
Horizon AI Python SDK
Managing Continuous Query
Continuous Query Results
Query API
Managing Continuous Query
List all Continuous Queries
GET
/
v1
/
org
/
{org_id}
/
team
/
{team_id}
/
{environment}
/
continuous_query
curl --request GET \
--url https://api.tryvital.io/management/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query \
--header 'X-Vital-Org-Key: <api-key>'
{
"data": [
{
"export_preferences": {
"data_events": {
"enabled": true
}
},
"id": "d25f4472-c679-4e7a-9442-2bce8c12afb1",
"query": {
"group_by": [
{
"arg": {
"index": "sleep"
},
"date_trunc": {
"unit": "month",
"value": 1
}
}
],
"select": [
{
"group_key": "*"
},
{
"arg": {
"value_macro": "sleep_score",
"version": "automatic"
},
"func": "mean"
}
],
"split_by_source": false
},
"query_config": {
"provider_priority_overrides": [
"oura"
]
},
"resource_dependencies": [
"sleep"
],
"result_table_schema": {
"group_key.0": "string",
"sleep_score": "int64"
},
"scheduling_preferences": {
"minimum_gap_duration_second": 3600
},
"slug": "weekly_mean_sleep_score",
"title": "Weekly Mean Sleep Score"
}
],
"next_cursor": "<string>"
}
Org Management API is available for the Scale plan.
The base URL of this endpoint is https://api.tryvital.io/management/
.
The endpoint accepts only Org Key (X-Vital-Org-Key
). Team API Key is not applicable.
Continuous Query is currently in closed beta. The query schema and the behaviour is subject to change based on beta feedback.
Authorizations
Path Parameters
Available options:
production
, sandbox
Response
200
application/json
Successful Response
Available options:
session_start
, session_end
, state
, type
, duration_second
, stage_asleep_second
, stage_awake_second
, stage_light_second
, stage_rem_second
, stage_deep_second
, stage_unknown_second
, latency_second
, heart_rate_minimum
, heart_rate_mean
, heart_rate_maximum
, heart_rate_dip
, heart_rate_resting
, efficiency
, hrv_mean_rmssd
, hrv_mean_sdnn
, skin_temperature
, skin_temperature_delta
, respiratory_rate
, score
, source_type
, source_provider
, source_app_id
, time_zone
Available options:
mean
, min
, max
, sum
, count
, median
, stddev
, oldest
, newest
Required range:
x > 1800
Available options:
profile
, activity
, sleep
, body
, workouts
, workout_stream
, connection
, order
, result
, appointment
, glucose
, heartrate
, hrv
, hrv
, ige
, igg
, blood_oxygen
, blood_pressure
, cholesterol
, device
, weight
, fat
, body_temperature
, body_temperature_delta
, meal
, water
, caffeine
, mindfulness_minutes
, steps
, calories_active
, distance
, floors_climbed
, respiratory_rate
, vo2_max
, calories_basal
, stress_level
, menstrual_cycle
, sleep_cycle
, electrocardiogram
, electrocardiogram_voltage
, afib_burden
, heart_rate_alert
, workout_duration
, insulin_injection
, carbohydrates
, note
, sleep_stream
, hypnogram
Available options:
oura
, fitbit
, garmin
, whoop
, strava
, renpho
, peloton
, wahoo
, zwift
, freestyle_libre
, abbott_libreview
, freestyle_libre_ble
, eight_sleep
, withings
, apple_health_kit
, manual
, ihealth
, google_fit
, beurer_api
, beurer_ble
, omron
, omron_ble
, onetouch_ble
, accuchek_ble
, contour_ble
, dexcom
, dexcom_v3
, hammerhead
, my_fitness_pal
, health_connect
, polar
, cronometer
, kardia
, whoop_v2
, ultrahuman
, my_fitness_pal_v2
, map_my_fitness
Available options:
vital-signs#40443-4#junction-heart-rate-resting-1
, placeholder
curl --request GET \
--url https://api.tryvital.io/management/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query \
--header 'X-Vital-Org-Key: <api-key>'
{
"data": [
{
"export_preferences": {
"data_events": {
"enabled": true
}
},
"id": "d25f4472-c679-4e7a-9442-2bce8c12afb1",
"query": {
"group_by": [
{
"arg": {
"index": "sleep"
},
"date_trunc": {
"unit": "month",
"value": 1
}
}
],
"select": [
{
"group_key": "*"
},
{
"arg": {
"value_macro": "sleep_score",
"version": "automatic"
},
"func": "mean"
}
],
"split_by_source": false
},
"query_config": {
"provider_priority_overrides": [
"oura"
]
},
"resource_dependencies": [
"sleep"
],
"result_table_schema": {
"group_key.0": "string",
"sleep_score": "int64"
},
"scheduling_preferences": {
"minimum_gap_duration_second": 3600
},
"slug": "weekly_mean_sleep_score",
"title": "Weekly Mean Sleep Score"
}
],
"next_cursor": "<string>"
}