Spike
App · 15 actions
Read a connected Spike user’s activity, sleep, workouts, and health data.
Actions
| Action | What it does |
|---|---|
| Get a metric time series | Get a metric time series for the connected Spike user. |
| Get daily statistics | Get daily statistics for the connected Spike user. |
| Get interval statistics | Get interval statistics for the connected Spike user. |
| Get lab report | Get lab report for the connected Spike user. |
| Get nutrition record | Get nutrition record for the connected Spike user. |
| Get provider record | Get provider record for the connected Spike user. |
| Get sleep record | Get sleep record for the connected Spike user. |
| Get user information | Get user information for the connected Spike user. |
| Get user properties | Get user properties for the connected Spike user. |
| Get workout | Get workout for the connected Spike user. |
| List lab reports | List lab reports for the connected Spike user. |
| List nutrition records | List nutrition records for the connected Spike user. |
| List provider records | List provider records for the connected Spike user. |
| List sleep records | List sleep records for the connected Spike user. |
| List workouts | List workouts for the connected Spike user. |
Get a metric time series
Get a metric time series for the connected Spike user.
Inputs
- From timestamp
from_timestampobject - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobject - End time of the query range in UTC, non-inclusive
- Metric
metrictextRequired - The metric you want to queryOne of:
heartrate_max(Heartrate max),heartrate_min(Heartrate min),heartrate_zone0_duration(Heartrate zone0 duration),heartrate_zone1_duration(Heartrate zone1 duration),heartrate_zone2_duration(Heartrate zone2 duration),heartrate_zone3_duration(Heartrate zone3 duration),heartrate_zone4_duration(Heartrate zone4 duration),heartrate_zone5_duration(Heartrate zone5 duration),heartrate,heartrate_resting(Heartrate resting), and 91 more. - Providers
providerslist - Enter the providers.One or more of:
strava,health_connect(Health connect),fitbit,garmin,huawei,dexcom,whoop,withings,suunto,google_health(Google health), and 10 more. - Include record IDS
include_record_idstrue/false - Whether to include the record IDs in the response
- Merge method
merge_methodtext - Method to merge dataOne of:
select_best_weighted_source(Select best weighted source),select_highest_coverage_source(Select highest coverage source),select_most_granular_source(Select most granular source),select_highest_priority_source_type(Select highest priority source type),merge_maximize_coverage(Merge maximize coverage),merge_maximize_granularity(Merge maximize granularity),merge_maximize_weighted_coverage(Merge maximize weighted coverage),merge_all_samples(Merge all samples). - Device types
device_typeslist - Device types to includeOne or more of:
unknown,phone,watch,scale,ring,head_mounted(Head mounted),fitness_band(Fitness band),chest_strap(Chest strap),smart_display(Smart display),accessory.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"device_types": [
"unknown"
],
"durations": [
1
],
"from_timestamp": "example",
"metric": "heartrate_max",
"offsets": [
1
],
"provider_sources": [
"apple_healthkit_sample"
],
"providers": [
"example"
],
"record_ids": [
"example"
],
"to_timestamp": "example",
"values": [
{}
]
}
}Get daily statistics
Get daily statistics for the connected Spike user.
Inputs
- From date
from_dateobjectRequired - Start time of the query range in user's local timezone according to the provider, inclusive
- To date
to_dateobjectRequired - End time of the query range in user's local timezone according to the provider, inclusive
- Exclude manual
exclude_manualtrue/false - Exclude manual metrics from the statistics
- Types
typeslistRequired - Enter the types.One or more of:
sleep_score(Sleep score),stress_score(Stress score),recovery_score(Recovery score),activity_score(Activity score),steps,distance_total(Distance total),distance_walking(Distance walking),distance_cycling(Distance cycling),distance_running(Distance running),calories_burned_basal(Calories burned basal), and 13 more. - Providers
providerslist - Enter the providers.
- Include record IDS
include_record_idstrue/false - Whether to include the record IDs in the response
- Device types
device_typeslist - Device types to include in the statisticsOne or more of:
unknown,phone,watch,scale,ring,head_mounted(Head mounted),fitness_band(Fitness band),chest_strap(Chest strap),smart_display(Smart display),accessory.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"from_date": {},
"statistics": [
{
"date": {},
"record_ids": [
"example"
],
"values": {}
}
],
"to_date": {}
}
}Get interval statistics
Get interval statistics for the connected Spike user.
Inputs
- From timestamp
from_timestampobjectRequired - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobjectRequired - End time of the query range in UTC, non-inclusive
- Interval
intervaltextRequired - Interval of the queryOne of:
1h. - Exclude manual
exclude_manualtrue/false - Exclude manual metrics from the statistics
- Types
typeslistRequired - Enter the types.One or more of:
steps,distance_total(Distance total),distance_walking(Distance walking),distance_cycling(Distance cycling),distance_running(Distance running),calories_burned_basal(Calories burned basal),calories_burned_active(Calories burned active),calories_burned_total(Calories burned total),heartrate,heartrate_max(Heartrate max), and 8 more. - Providers
providerslist - Enter the providers.One or more of:
strava,health_connect(Health connect),fitbit,garmin,huawei,dexcom,whoop,withings,suunto,google_health(Google health), and 10 more. - Include record IDS
include_record_idstrue/false - Whether to include the record IDs in the response
- Device types
device_typeslist - Device types to include in the statisticsOne or more of:
unknown,phone,watch,scale,ring,head_mounted(Head mounted),fitness_band(Fitness band),chest_strap(Chest strap),smart_display(Smart display),accessory.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"from_timestamp": "example",
"statistics": [
{
"from_timestamp": "example",
"record_ids": [
"example"
],
"to_timestamp": "example",
"values": {}
}
],
"to_timestamp": "example"
}
}Get lab report
Get lab report for the connected Spike user.
Inputs
- Lab report ID
lab_report_idtextRequired - Lab Report ID
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"collection_date": "example",
"lab_information": {
"address": "example",
"email_address": "example",
"name": "example",
"notes": "example",
"phone_number": "example"
},
"modified_at": "example",
"notes": "example",
"original_record_id": "example",
"parsing_error": "example",
"patient_information": {
"address": "example",
"age": 1,
"date_of_birth": "example",
"email_address": "example",
"gender": "example",
"name": "example",
"notes": "example",
"patient_id": "example",
"phone_number": "example"
},
"record_id": "example",
"result_date": "example",
"sections": [
{
"loinc_code": "example",
"loinc_common_name": "example",
"original_section_name": "example",
"results": [
{}
],
"section_notes": "example",
"standard_section_name": "example"
}
],
"status": "pending",
"uploaded_at": "example"
}
}Get nutrition record
Get nutrition record for the connected Spike user.
Inputs
- Nutrition record ID
nutrition_record_idtextRequired - Nutrition report record ID
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"consumed_at": {},
"dish_description": "example",
"dish_description_translated": "example",
"dish_name": "example",
"dish_name_translated": "example",
"failure_reason": "example",
"ingredients": [
{
"name": "example",
"name_translated": "example",
"nutritional_fields": {},
"serving_size": 1,
"unit": "g"
}
],
"input_type": "image",
"modified_at": "example",
"nutri_score": "example",
"nutritional_fields": {
"calcium_mg": 1,
"carbohydrate_g": 1,
"cholesterol_mg": 1,
"energy_kcal": 1,
"fat_monounsaturated_g": 1,
"fat_polyunsaturated_g": 1,
"fat_saturated_g": 1,
"fat_total_g": 1,
"fat_trans_g": 1,
"fiber_total_dietary_g": 1,
"folate_mcg": 1,
"iron_mg": 1,
"magnesium_mg": 1,
"manganese_mcg": 1,
"niacin_mg": 1,
"phosphorus_mg": 1,
"potassium_mg": 1,
"protein_g": 1
},
"record_id": "example",
"serving_size": 1,
"status": "pending",
"unit": "g",
"uploaded_at": "example",
"user_time_offset_minutes": 1
}
}Get provider record
Get provider record for the connected Spike user.
Inputs
- Record ID
record_idtextRequired - Enter the record id.
- Metrics
metricslist - Enter the metrics.One or more of:
heartrate_max(Heartrate max),heartrate_min(Heartrate min),heartrate_zone0_duration(Heartrate zone0 duration),heartrate_zone1_duration(Heartrate zone1 duration),heartrate_zone2_duration(Heartrate zone2 duration),heartrate_zone3_duration(Heartrate zone3 duration),heartrate_zone4_duration(Heartrate zone4 duration),heartrate_zone5_duration(Heartrate zone5 duration),heartrate,heartrate_resting(Heartrate resting), and 91 more. - Include samples
include_samplestrue/false - Enter the include samples.
- Include provider specific metrics
include_provider_specific_metricstrue/false - Enter the include provider specific metrics.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"activity_id": "example",
"activity_tags": [
"on_foot"
],
"activity_type": "other",
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"is_source_aggregated": true,
"metrics": {
"air_temperature": 1,
"air_temperature_max": 1,
"air_temperature_min": 1,
"ascent": 1,
"basal_body_temperature": 1,
"basal_body_temperature_max": 1,
"basal_body_temperature_min": 1,
"bedtime_duration": 1,
"blood_pressure_diastolic": 1,
"blood_pressure_diastolic_max": 1,
"blood_pressure_diastolic_min": 1,
"blood_pressure_systolic": 1,
"blood_pressure_systolic_max": 1,
"blood_pressure_systolic_min": 1,
"body_bone_mass": 1,
"body_fat": 1,
"body_fat_max": 1,
"body_fat_min": 1
},
"modified_at": "example",
"provider_local_date": {},
"provider_slug": "example",
"provider_source": "apple_healthkit_sample",
"provider_source_type": "provider_summary",
"provider_specific_metrics": {
"garmin": {},
"huawei": {},
"oura": {},
"polar": {},
"suunto": {},
"whoop": {},
"withings": {}
},
"record_id": "example",
"samples": {
"durations": [
1
],
"offsets": [
1
],
"values": {}
},
"source": {
"device_manufacturer": "example",
"device_model": "example",
"device_product": "example",
"device_version": "example",
"source_bundle_identifier": "example",
"source_os_version": "example",
"source_product": "example",
"source_version": "example"
},
"start_at_timestamp": "example"
}
}Get sleep record
Get sleep record for the connected Spike user.
Inputs
- Sleep ID
sleep_idtextRequired - Sleep ID
- Include stages
include_stagestrue/false - Include stages
- Include samples
include_samplestrue/false - Include samples
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"metrics": {
"air_temperature": 1,
"air_temperature_max": 1,
"air_temperature_min": 1,
"ascent": 1,
"basal_body_temperature": 1,
"basal_body_temperature_max": 1,
"basal_body_temperature_min": 1,
"bedtime_duration": 1,
"blood_pressure_diastolic": 1,
"blood_pressure_diastolic_max": 1,
"blood_pressure_diastolic_min": 1,
"blood_pressure_systolic": 1,
"blood_pressure_systolic_max": 1,
"blood_pressure_systolic_min": 1,
"body_bone_mass": 1,
"body_fat": 1,
"body_fat_max": 1,
"body_fat_min": 1
},
"modified_at": "example",
"provider_slug": "example",
"record_ids": [
"example"
],
"samples": {
"durations": [
1
],
"offsets": [
1
],
"values": {}
},
"score": 1,
"sleep_date": {},
"sleep_id": "example",
"source": {
"device_manufacturer": "example",
"device_model": "example",
"device_product": "example",
"device_version": "example",
"source_bundle_identifier": "example",
"source_os_version": "example",
"source_product": "example",
"source_version": "example"
},
"stages": [
{
"duration": 1,
"end_at": "example",
"metrics": {},
"stage": "awake",
"start_at": "example"
}
],
"start_at_timestamp": "example",
"user_time_offset_minutes": 1
}
}Get user information
Get user information for the connected Spike user.
Inputs
None.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"application_id": 1,
"application_user_id": "example",
"compat_application_client_id": "example",
"compat_application_client_token": "example",
"created_at": "example",
"integrated_providers": [
{
"created_at": "example",
"is_integration_broken": true,
"provider_integration_id": 1,
"provider_slug": "example"
}
],
"uid": "example"
}
}Get user properties
Get user properties for the connected Spike user.
Inputs
None.
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"properties": {
"birth_date": "example",
"birth_year": 1,
"body_bone_mass": 1,
"body_fat": 1,
"body_mass_index": 1,
"gender": "unknown",
"height": 1,
"language": "example",
"resting_heartrate": 1,
"timezone": "example",
"weight": 1
}
}
}Get workout
Get workout for the connected Spike user.
Inputs
- Workout ID
workout_idtextRequired - Workout ID
- Include sessions
include_sessionstrue/false - Include sessions
- Include laps
include_lapstrue/false - Include laps
- Include samples
include_samplestrue/false - Include samples
- Include route points
include_route_pointstrue/false - Include route points
- Include splits
include_splitstrue/false - Include splits
- Include segments
include_segmentstrue/false - Include segments
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"is_source_aggregated": true,
"laps": [
{
"duration": 1,
"end_at": "example",
"lap": 1,
"metrics": {},
"start_at": "example"
}
],
"metrics": {
"air_temperature": 1,
"air_temperature_max": 1,
"air_temperature_min": 1,
"ascent": 1,
"basal_body_temperature": 1,
"basal_body_temperature_max": 1,
"basal_body_temperature_min": 1,
"bedtime_duration": 1,
"blood_pressure_diastolic": 1,
"blood_pressure_diastolic_max": 1,
"blood_pressure_diastolic_min": 1,
"blood_pressure_systolic": 1,
"blood_pressure_systolic_max": 1,
"blood_pressure_systolic_min": 1,
"body_bone_mass": 1,
"body_fat": 1,
"body_fat_max": 1,
"body_fat_min": 1
},
"modified_at": "example",
"provider_local_date": {},
"provider_slug": "example",
"provider_source": "apple_healthkit_sample",
"provider_source_type": "provider_summary",
"record_id": "example",
"route_points": {
"durations": [
1
],
"offsets": [
1
],
"values": {}
},
"samples": {
"durations": [
1
],
"offsets": [
1
],
"values": {}
},
"segments": [
{
"duration": 1,
"end_at": "example",
"metrics": {},
"start_at": "example"
}
],
"sessions": [
{
"duration": 1,
"end_at": "example",
"metrics": {},
"start_at": "example"
}
],
"source": {
"device_manufacturer": "example",
"device_model": "example",
"device_product": "example",
"device_version": "example",
"source_bundle_identifier": "example",
"source_os_version": "example",
"source_product": "example",
"source_version": "example"
},
"splits": [
{
"duration": 1,
"end_at": "example",
"metrics": {},
"start_at": "example"
}
]
}
}List lab reports
List lab reports for the connected Spike user.
Inputs
- From timestamp
from_timestampobjectRequired - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobjectRequired - End time of the query range in UTC, non-inclusive
Outputs
datalist- The response from Spike.
Example output
{
"data": [
{
"collection_date": "example",
"lab_information": {
"address": "example",
"email_address": "example",
"name": "example",
"notes": "example",
"phone_number": "example"
},
"modified_at": "example",
"notes": "example",
"original_record_id": "example",
"parsing_error": "example",
"patient_information": {
"address": "example",
"age": 1,
"date_of_birth": "example",
"email_address": "example",
"gender": "example",
"name": "example",
"notes": "example",
"patient_id": "example",
"phone_number": "example"
},
"record_id": "example",
"result_date": "example",
"sections": [
{
"loinc_code": "example",
"loinc_common_name": "example",
"original_section_name": "example",
"results": [
{}
],
"section_notes": "example",
"standard_section_name": "example"
}
],
"status": "pending",
"uploaded_at": "example"
}
]
}List nutrition records
List nutrition records for the connected Spike user.
Inputs
- From timestamp
from_timestampobjectRequired - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobjectRequired - End time of the query range in UTC, non-inclusive
- Consumed
consumedtext - Filter by consumed status: 'true' for saved records with consumed_at, 'false' for analyze-only records, 'any' for both. Default: 'true'
Outputs
datalist- The response from Spike.
Example output
{
"data": [
{
"consumed_at": {},
"dish_description": "example",
"dish_description_translated": "example",
"dish_name": "example",
"dish_name_translated": "example",
"failure_reason": "example",
"ingredients": [
{
"name": "example",
"name_translated": "example",
"nutritional_fields": {},
"serving_size": 1,
"unit": "g"
}
],
"input_type": "image",
"modified_at": "example",
"nutri_score": "example",
"nutritional_fields": {
"calcium_mg": 1,
"carbohydrate_g": 1,
"cholesterol_mg": 1,
"energy_kcal": 1,
"fat_monounsaturated_g": 1,
"fat_polyunsaturated_g": 1,
"fat_saturated_g": 1,
"fat_total_g": 1,
"fat_trans_g": 1,
"fiber_total_dietary_g": 1,
"folate_mcg": 1,
"iron_mg": 1,
"magnesium_mg": 1,
"manganese_mcg": 1,
"niacin_mg": 1,
"phosphorus_mg": 1,
"potassium_mg": 1,
"protein_g": 1
},
"record_id": "example",
"serving_size": 1,
"status": "pending",
"unit": "g",
"uploaded_at": "example",
"user_time_offset_minutes": 1
}
]
}List provider records
List provider records for the connected Spike user.
Inputs
- From timestamp
from_timestampobject - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobject - End time of the query range in UTC, non-inclusive
- Providers
providerslist - Enter the providers.One or more of:
strava,health_connect(Health connect),fitbit,garmin,huawei,dexcom,whoop,withings,suunto,google_health(Google health), and 10 more. - Metrics
metricslist - Include metricsOne or more of:
heartrate_max(Heartrate max),heartrate_min(Heartrate min),heartrate_zone0_duration(Heartrate zone0 duration),heartrate_zone1_duration(Heartrate zone1 duration),heartrate_zone2_duration(Heartrate zone2 duration),heartrate_zone3_duration(Heartrate zone3 duration),heartrate_zone4_duration(Heartrate zone4 duration),heartrate_zone5_duration(Heartrate zone5 duration),heartrate,heartrate_resting(Heartrate resting), and 91 more. - Include provider specific metrics
include_provider_specific_metricstrue/false - Include provider specific metrics such as unique sleep score
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"from_timestamp": "example",
"records": [
{
"activity_id": "example",
"activity_tags": [
"on_foot"
],
"activity_type": "other",
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"is_source_aggregated": true,
"metrics": {},
"modified_at": "example",
"provider_local_date": {},
"provider_slug": "example",
"provider_source": "apple_healthkit_sample",
"provider_source_type": "provider_summary",
"provider_specific_metrics": {},
"record_id": "example",
"samples": {},
"source": {},
"start_at_timestamp": "example"
}
],
"to_timestamp": "example"
}
}List sleep records
List sleep records for the connected Spike user.
Inputs
- From date
from_dateobject - Start time of the query range in user's local timezone according to the provider, inclusive
- To date
to_dateobject - End time of the query range in user's local timezone according to the provider, inclusive
- Providers
providerslist - ProvidersOne or more of:
strava,health_connect(Health connect),fitbit,garmin,huawei,dexcom,whoop,withings,suunto,google_health(Google health), and 10 more. - Include stages
include_stagestrue/false - Include stages
- Include samples
include_samplestrue/false - Include samples
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"from_date": {},
"sleeps": [
{
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"metrics": {},
"modified_at": "example",
"provider_slug": "example",
"record_ids": [
"example"
],
"samples": {},
"score": 1,
"sleep_date": {},
"sleep_id": "example",
"source": {},
"stages": [
{}
],
"start_at_timestamp": "example",
"user_time_offset_minutes": 1
}
],
"to_date": {}
}
}List workouts
List workouts for the connected Spike user.
Inputs
- From timestamp
from_timestampobject - Start time of the query range in UTC, inclusive
- To timestamp
to_timestampobject - End time of the query range in UTC, non-inclusive
- Providers
providerslist - Providers
- Activity tags
activity_tagslist - Activity tagsOne or more of:
on_foot(On foot),running,cycling,walking,gym,swimming,winter_sports(Winter sports),water_sports(Water sports),team_sports(Team sports),racket_sports(Racket sports), and 11 more. - Activity types
activity_typeslist - Activity typesOne or more of:
aerobics,play,house_work(House work),gardening,work,workout,running,indoor_running(Indoor running),obstacle_run(Obstacle run),street_running(Street running), and 154 more. - Include sessions
include_sessionstrue/false - Include sessions
- Include laps
include_lapstrue/false - Include laps
- Include samples
include_samplestrue/false - Include samples
- Include route points
include_route_pointstrue/false - Include route points
- Include splits
include_splitstrue/false - Include splits
- Include segments
include_segmentstrue/false - Include segments
Outputs
dataobject- The response from Spike.
Example output
{
"data": {
"from_timestamp": "example",
"to_timestamp": "example",
"workouts": [
{
"duration": 1,
"end_at_timestamp": "example",
"input_method": "unknown",
"is_source_aggregated": true,
"laps": [
{}
],
"metrics": {},
"modified_at": "example",
"provider_local_date": {},
"provider_slug": "example",
"provider_source": "apple_healthkit_sample",
"provider_source_type": "provider_summary",
"record_id": "example",
"route_points": {},
"samples": {},
"segments": [
{}
],
"sessions": [
{}
],
"source": {},
"splits": [
{}
]
}
]
}
}