data_points
Creates, updates, deletes, gets or lists a data_points resource.
Overview
| Name | data_points |
| Type | Resource |
| Id | google.health.data_points |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point} Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef The {user} ID is a system-generated identifier, as described in Identity.health_user_id. The {data_type} ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. heart-rate for the heart_rate field. The {data_point} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens. |
activeEnergyBurned | object | Optional. Data for points in the active-energy-burned interval data type collection. (id: ActiveEnergyBurned) |
activeMinutes | object | Optional. Data for points in the active-minutes interval data type collection. (id: ActiveMinutes) |
activeZoneMinutes | object | Optional. Data for points in the active-zone-minutes interval data type collection, measured in minutes. (id: ActiveZoneMinutes) |
activityLevel | object | Optional. Data for points in the activity-level daily data type collection. (id: ActivityLevel) |
altitude | object | Optional. Data for points in the altitude interval data type collection. (id: Altitude) |
basalEnergyBurned | object | Optional. Data for points in the basal-energy-burned interval data type collection. (id: BasalEnergyBurned) |
bloodGlucose | object | Optional. Data for points in the blood-glucose sample data type collection. (id: BloodGlucose) |
bodyFat | object | Optional. Data for points in the body-fat sample data type collection. (id: BodyFat) |
coreBodyTemperature | object | Optional. Data for points in the core-body-temperature sample data type collection. (id: CoreBodyTemperature) |
dailyHeartRateVariability | object | Optional. Data for points in the daily-heart-rate-variability daily data type collection. (id: DailyHeartRateVariability) |
dailyHeartRateZones | object | Optional. Data for points in the daily-heart-rate-zones daily data type collection. (id: DailyHeartRateZones) |
dailyOxygenSaturation | object | Optional. Data for points in the daily-oxygen-saturation daily data type collection. (id: DailyOxygenSaturation) |
dailyRespiratoryRate | object | Optional. Data for points in the daily-respiratory-rate daily data type collection. (id: DailyRespiratoryRate) |
dailyRestingHeartRate | object | Optional. Data for points in the daily-resting-heart-rate daily data type collection. (id: DailyRestingHeartRate) |
dailySleepTemperatureDerivations | object | Optional. Data for points in the daily-sleep-temperature-derivations daily data type collection. (id: DailySleepTemperatureDerivations) |
dailyVo2Max | object | Optional. Data for points in the daily-vo2-max daily data type collection. (id: DailyVO2Max) |
dataSource | object | Optional. Data source information for the metric (id: DataSource) |
distance | object | Optional. Data for points in the distance interval data type collection. (id: Distance) |
electrocardiogram | object | Optional. Data for points in the electrocardiogram session data type collection. (id: Electrocardiogram) |
exercise | object | Optional. Data for points in the exercise session data type collection. (id: Exercise) |
floors | object | Optional. Data for points in the floors interval data type collection. (id: Floors) |
food | object | Optional. The food details. (id: Food) |
foodMeasurementUnit | object | Optional. The food measurement unit details. (id: FoodMeasurementUnit) |
heartRate | object | Optional. Data for points in the heart-rate sample data type collection. (id: HeartRate) |
heartRateVariability | object | Optional. Data for points in the heart-rate-variability sample data type collection. (id: HeartRateVariability) |
height | object | Optional. Data for points in the height sample data type collection. (id: Height) |
hydrationLog | object | Optional. Data for points in the hydration-log session data type collection. (id: HydrationLog) |
irregularRhythmNotification | object | Optional. Data for points in the irregular-rhythm-notification session data type collection. (id: IrregularRhythmNotification) |
nutritionLog | object | Optional. Data for points in the nutrition-log session data type collection. (id: NutritionLog) |
oxygenSaturation | object | Optional. Data for points in the oxygen-saturation sample data type collection. (id: OxygenSaturation) |
respiratoryRateSleepSummary | object | Optional. Data for points in the respiratory-rate-sleep-summary sample data type collection. (id: RespiratoryRateSleepSummary) |
runVo2Max | object | Optional. Data for points in the run-vo2-max sample data type collection. (id: RunVO2Max) |
sedentaryPeriod | object | Optional. Data for points in the sedentary-period interval data type collection. (id: SedentaryPeriod) |
sleep | object | Optional. Data for points in the sleep session data type collection. (id: Sleep) |
steps | object | Optional. Data for points in the steps interval data type collection. (id: Steps) |
swimLengthsData | object | Optional. Data for points in the swim-lengths-data interval data type collection. (id: SwimLengthsData) |
timeInHeartRateZone | object | Optional. Data for points in the time-in-heart-rate-zone interval data type collection. (id: TimeInHeartRateZone) |
vo2Max | object | Optional. Data for points in the vo2-max sample data type collection. (id: VO2Max) |
weight | object | Optional. Data for points in the weight sample data type collection. (id: Weight) |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point} Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef The {user} ID is a system-generated identifier, as described in Identity.health_user_id. The {data_type} ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. heart-rate for the heart_rate field. The {data_point} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens. |
activeEnergyBurned | object | Optional. Data for points in the active-energy-burned interval data type collection. (id: ActiveEnergyBurned) |
activeMinutes | object | Optional. Data for points in the active-minutes interval data type collection. (id: ActiveMinutes) |
activeZoneMinutes | object | Optional. Data for points in the active-zone-minutes interval data type collection, measured in minutes. (id: ActiveZoneMinutes) |
activityLevel | object | Optional. Data for points in the activity-level daily data type collection. (id: ActivityLevel) |
altitude | object | Optional. Data for points in the altitude interval data type collection. (id: Altitude) |
basalEnergyBurned | object | Optional. Data for points in the basal-energy-burned interval data type collection. (id: BasalEnergyBurned) |
bloodGlucose | object | Optional. Data for points in the blood-glucose sample data type collection. (id: BloodGlucose) |
bodyFat | object | Optional. Data for points in the body-fat sample data type collection. (id: BodyFat) |
coreBodyTemperature | object | Optional. Data for points in the core-body-temperature sample data type collection. (id: CoreBodyTemperature) |
dailyHeartRateVariability | object | Optional. Data for points in the daily-heart-rate-variability daily data type collection. (id: DailyHeartRateVariability) |
dailyHeartRateZones | object | Optional. Data for points in the daily-heart-rate-zones daily data type collection. (id: DailyHeartRateZones) |
dailyOxygenSaturation | object | Optional. Data for points in the daily-oxygen-saturation daily data type collection. (id: DailyOxygenSaturation) |
dailyRespiratoryRate | object | Optional. Data for points in the daily-respiratory-rate daily data type collection. (id: DailyRespiratoryRate) |
dailyRestingHeartRate | object | Optional. Data for points in the daily-resting-heart-rate daily data type collection. (id: DailyRestingHeartRate) |
dailySleepTemperatureDerivations | object | Optional. Data for points in the daily-sleep-temperature-derivations daily data type collection. (id: DailySleepTemperatureDerivations) |
dailyVo2Max | object | Optional. Data for points in the daily-vo2-max daily data type collection. (id: DailyVO2Max) |
dataSource | object | Optional. Data source information for the metric (id: DataSource) |
distance | object | Optional. Data for points in the distance interval data type collection. (id: Distance) |
electrocardiogram | object | Optional. Data for points in the electrocardiogram session data type collection. (id: Electrocardiogram) |
exercise | object | Optional. Data for points in the exercise session data type collection. (id: Exercise) |
floors | object | Optional. Data for points in the floors interval data type collection. (id: Floors) |
food | object | Optional. The food details. (id: Food) |
foodMeasurementUnit | object | Optional. The food measurement unit details. (id: FoodMeasurementUnit) |
heartRate | object | Optional. Data for points in the heart-rate sample data type collection. (id: HeartRate) |
heartRateVariability | object | Optional. Data for points in the heart-rate-variability sample data type collection. (id: HeartRateVariability) |
height | object | Optional. Data for points in the height sample data type collection. (id: Height) |
hydrationLog | object | Optional. Data for points in the hydration-log session data type collection. (id: HydrationLog) |
irregularRhythmNotification | object | Optional. Data for points in the irregular-rhythm-notification session data type collection. (id: IrregularRhythmNotification) |
nutritionLog | object | Optional. Data for points in the nutrition-log session data type collection. (id: NutritionLog) |
oxygenSaturation | object | Optional. Data for points in the oxygen-saturation sample data type collection. (id: OxygenSaturation) |
respiratoryRateSleepSummary | object | Optional. Data for points in the respiratory-rate-sleep-summary sample data type collection. (id: RespiratoryRateSleepSummary) |
runVo2Max | object | Optional. Data for points in the run-vo2-max sample data type collection. (id: RunVO2Max) |
sedentaryPeriod | object | Optional. Data for points in the sedentary-period interval data type collection. (id: SedentaryPeriod) |
sleep | object | Optional. Data for points in the sleep session data type collection. (id: Sleep) |
steps | object | Optional. Data for points in the steps interval data type collection. (id: Steps) |
swimLengthsData | object | Optional. Data for points in the swim-lengths-data interval data type collection. (id: SwimLengthsData) |
timeInHeartRateZone | object | Optional. Data for points in the time-in-heart-rate-zone interval data type collection. (id: TimeInHeartRateZone) |
vo2Max | object | Optional. Data for points in the vo2-max sample data type collection. (id: VO2Max) |
weight | object | Optional. Data for points in the weight sample data type collection. (id: Weight) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | usersId, dataTypesId, dataPointsId | Get a single identifyable data point. | |
list | select | usersId, dataTypesId | pageSize, pageToken, filter | Query user health and fitness data points. |
create | insert | usersId, dataTypesId | Creates a single identifiable data point. | |
patch | update | usersId, dataTypesId, dataPointsId | Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail. | |
batch_delete | delete | usersId, dataTypesId | Delete a batch of identifyable data points. | |
reconcile | exec | usersId, dataTypesId | pageSize, pageToken, filter, dataSourceFamily | Reconcile data points from multiple data sources into a single data stream. |
export_exercise_tcx | exec | usersId, dataTypesId, dataPointsId | partialData | Exports exercise data in TCX format. IMPORTANT: HTTP clients must append ?alt=media to the request URL to download the raw TCX file. Example: https://health.googleapis.com/v4/users/me/dataTypes/exercise/dataPoints/EXERCISE_ID:exportExerciseTcx?alt=media Without alt=media, the server returns a JSON response (ExportExerciseTcxResponse) which is intended primarily for gRPC clients. Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed. |
roll_up | exec | usersId, dataTypesId | Roll up data points over physical time intervals for supported data types. | |
daily_roll_up | exec | usersId, dataTypesId | Roll up data points over civil time intervals for supported data types. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
dataPointsId | string | |
dataTypesId | string | |
usersId | string | |
dataSourceFamily | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
partialData | boolean |
SELECT examples
- get
- list
Get a single identifyable data point.
SELECT
name,
activeEnergyBurned,
activeMinutes,
activeZoneMinutes,
activityLevel,
altitude,
basalEnergyBurned,
bloodGlucose,
bodyFat,
coreBodyTemperature,
dailyHeartRateVariability,
dailyHeartRateZones,
dailyOxygenSaturation,
dailyRespiratoryRate,
dailyRestingHeartRate,
dailySleepTemperatureDerivations,
dailyVo2Max,
dataSource,
distance,
electrocardiogram,
exercise,
floors,
food,
foodMeasurementUnit,
heartRate,
heartRateVariability,
height,
hydrationLog,
irregularRhythmNotification,
nutritionLog,
oxygenSaturation,
respiratoryRateSleepSummary,
runVo2Max,
sedentaryPeriod,
sleep,
steps,
swimLengthsData,
timeInHeartRateZone,
vo2Max,
weight
FROM google.health.data_points
WHERE usersId = '{{ usersId }}' -- required
AND dataTypesId = '{{ dataTypesId }}' -- required
AND dataPointsId = '{{ dataPointsId }}' -- required
;
Query user health and fitness data points.
SELECT
name,
activeEnergyBurned,
activeMinutes,
activeZoneMinutes,
activityLevel,
altitude,
basalEnergyBurned,
bloodGlucose,
bodyFat,
coreBodyTemperature,
dailyHeartRateVariability,
dailyHeartRateZones,
dailyOxygenSaturation,
dailyRespiratoryRate,
dailyRestingHeartRate,
dailySleepTemperatureDerivations,
dailyVo2Max,
dataSource,
distance,
electrocardiogram,
exercise,
floors,
food,
foodMeasurementUnit,
heartRate,
heartRateVariability,
height,
hydrationLog,
irregularRhythmNotification,
nutritionLog,
oxygenSaturation,
respiratoryRateSleepSummary,
runVo2Max,
sedentaryPeriod,
sleep,
steps,
swimLengthsData,
timeInHeartRateZone,
vo2Max,
weight
FROM google.health.data_points
WHERE usersId = '{{ usersId }}' -- required
AND dataTypesId = '{{ dataTypesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a single identifiable data point.
INSERT INTO google.health.data_points (
data__activeEnergyBurned,
data__heartRate,
data__dailyVo2Max,
data__steps,
data__runVo2Max,
data__vo2Max,
data__dailyRestingHeartRate,
data__bloodGlucose,
data__activeMinutes,
data__dailyHeartRateVariability,
data__oxygenSaturation,
data__hydrationLog,
data__nutritionLog,
data__heartRateVariability,
data__weight,
data__sleep,
data__dailyOxygenSaturation,
data__food,
data__altitude,
data__swimLengthsData,
data__basalEnergyBurned,
data__dailyRespiratoryRate,
data__irregularRhythmNotification,
data__distance,
data__exercise,
data__floors,
data__respiratoryRateSleepSummary,
data__foodMeasurementUnit,
data__activityLevel,
data__timeInHeartRateZone,
data__dailySleepTemperatureDerivations,
data__height,
data__name,
data__electrocardiogram,
data__activeZoneMinutes,
data__coreBodyTemperature,
data__sedentaryPeriod,
data__dailyHeartRateZones,
data__dataSource,
data__bodyFat,
usersId,
dataTypesId
)
SELECT
'{{ activeEnergyBurned }}',
'{{ heartRate }}',
'{{ dailyVo2Max }}',
'{{ steps }}',
'{{ runVo2Max }}',
'{{ vo2Max }}',
'{{ dailyRestingHeartRate }}',
'{{ bloodGlucose }}',
'{{ activeMinutes }}',
'{{ dailyHeartRateVariability }}',
'{{ oxygenSaturation }}',
'{{ hydrationLog }}',
'{{ nutritionLog }}',
'{{ heartRateVariability }}',
'{{ weight }}',
'{{ sleep }}',
'{{ dailyOxygenSaturation }}',
'{{ food }}',
'{{ altitude }}',
'{{ swimLengthsData }}',
'{{ basalEnergyBurned }}',
'{{ dailyRespiratoryRate }}',
'{{ irregularRhythmNotification }}',
'{{ distance }}',
'{{ exercise }}',
'{{ floors }}',
'{{ respiratoryRateSleepSummary }}',
'{{ foodMeasurementUnit }}',
'{{ activityLevel }}',
'{{ timeInHeartRateZone }}',
'{{ dailySleepTemperatureDerivations }}',
'{{ height }}',
'{{ name }}',
'{{ electrocardiogram }}',
'{{ activeZoneMinutes }}',
'{{ coreBodyTemperature }}',
'{{ sedentaryPeriod }}',
'{{ dailyHeartRateZones }}',
'{{ dataSource }}',
'{{ bodyFat }}',
'{{ usersId }}',
'{{ dataTypesId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: data_points
props:
- name: usersId
value: "{{ usersId }}"
description: Required parameter for the data_points resource.
- name: dataTypesId
value: "{{ dataTypesId }}"
description: Required parameter for the data_points resource.
- name: activeEnergyBurned
description: |
Optional. Data for points in the `active-energy-burned` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
kcal: {{ kcal }}
- name: heartRate
description: |
Optional. Data for points in the `heart-rate` sample data type collection.
value:
metadata:
motionContext: "{{ motionContext }}"
sensorLocation: "{{ sensorLocation }}"
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
beatsPerMinute: "{{ beatsPerMinute }}"
- name: dailyVo2Max
description: |
Optional. Data for points in the `daily-vo2-max` daily data type collection.
value:
estimated: {{ estimated }}
vo2Max: {{ vo2Max }}
cardioFitnessLevel: "{{ cardioFitnessLevel }}"
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
vo2MaxCovariance: {{ vo2MaxCovariance }}
- name: steps
description: |
Optional. Data for points in the `steps` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
count: "{{ count }}"
- name: runVo2Max
description: |
Optional. Data for points in the `run-vo2-max` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
runVo2Max: {{ runVo2Max }}
- name: vo2Max
description: |
Optional. Data for points in the `vo2-max` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
vo2Max: {{ vo2Max }}
measurementMethod: "{{ measurementMethod }}"
- name: dailyRestingHeartRate
description: |
Optional. Data for points in the `daily-resting-heart-rate` daily data type collection.
value:
dailyRestingHeartRateMetadata:
calculationMethod: "{{ calculationMethod }}"
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
beatsPerMinute: "{{ beatsPerMinute }}"
- name: bloodGlucose
description: |
Optional. Data for points in the `blood-glucose` sample data type collection.
value:
measurementTiming: "{{ measurementTiming }}"
specimen: "{{ specimen }}"
measurementSource: "{{ measurementSource }}"
notes: "{{ notes }}"
bloodGlucoseMilligramsPerDeciliter: {{ bloodGlucoseMilligramsPerDeciliter }}
mealType: "{{ mealType }}"
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
- name: activeMinutes
description: |
Optional. Data for points in the `active-minutes` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
activeMinutesByActivityLevel:
- activeMinutes: "{{ activeMinutes }}"
activityLevel: "{{ activityLevel }}"
- name: dailyHeartRateVariability
description: |
Optional. Data for points in the `daily-heart-rate-variability` daily data type collection.
value:
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
averageHeartRateVariabilityMilliseconds: {{ averageHeartRateVariabilityMilliseconds }}
entropy: {{ entropy }}
deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds: {{ deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds }}
nonRemHeartRateBeatsPerMinute: "{{ nonRemHeartRateBeatsPerMinute }}"
- name: oxygenSaturation
description: |
Optional. Data for points in the `oxygen-saturation` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
percentage: {{ percentage }}
- name: hydrationLog
description: |
Optional. Data for points in the `hydration-log` session data type collection.
value:
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
amountConsumed:
milliliters: {{ milliliters }}
userProvidedUnit: "{{ userProvidedUnit }}"
- name: nutritionLog
description: |
Optional. Data for points in the `nutrition-log` session data type collection.
value:
nutrients:
- quantity:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
nutrient: "{{ nutrient }}"
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
serving:
foodMeasurementUnitDisplayName: "{{ foodMeasurementUnitDisplayName }}"
amount: {{ amount }}
foodMeasurementUnit: "{{ foodMeasurementUnit }}"
foodDisplayName: "{{ foodDisplayName }}"
food: "{{ food }}"
energy:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
totalCarbohydrate:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
energyFromFat:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
mealType: "{{ mealType }}"
totalFat:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
- name: heartRateVariability
description: |
Optional. Data for points in the `heart-rate-variability` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
rootMeanSquareOfSuccessiveDifferencesMilliseconds: {{ rootMeanSquareOfSuccessiveDifferencesMilliseconds }}
standardDeviationMilliseconds: {{ standardDeviationMilliseconds }}
- name: weight
description: |
Optional. Data for points in the `weight` sample data type collection.
value:
weightGrams: {{ weightGrams }}
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
notes: "{{ notes }}"
- name: sleep
description: |
Optional. Data for points in the `sleep` session data type collection.
value:
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
updateTime: "{{ updateTime }}"
type: "{{ type }}"
stages:
- createTime: "{{ createTime }}"
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
type: "{{ type }}"
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
updateTime: "{{ updateTime }}"
metadata:
processed: {{ processed }}
stagesStatus: "{{ stagesStatus }}"
externalId: "{{ externalId }}"
nap: {{ nap }}
manuallyEdited: {{ manuallyEdited }}
mainSleep: {{ mainSleep }}
createTime: "{{ createTime }}"
outOfBedSegments:
- endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
summary:
minutesAfterWakeUp: "{{ minutesAfterWakeUp }}"
minutesAsleep: "{{ minutesAsleep }}"
stagesSummary:
- minutes: "{{ minutes }}"
count: "{{ count }}"
type: "{{ type }}"
minutesAwake: "{{ minutesAwake }}"
minutesInSleepPeriod: "{{ minutesInSleepPeriod }}"
minutesToFallAsleep: "{{ minutesToFallAsleep }}"
- name: dailyOxygenSaturation
description: |
Optional. Data for points in the `daily-oxygen-saturation` daily data type collection.
value:
standardDeviationPercentage: {{ standardDeviationPercentage }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
lowerBoundPercentage: {{ lowerBoundPercentage }}
upperBoundPercentage: {{ upperBoundPercentage }}
averagePercentage: {{ averagePercentage }}
- name: food
description: |
Optional. The food details.
value:
languageCode: "{{ languageCode }}"
totalCarbohydrate:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
defaultServing:
multiplier: {{ multiplier }}
foodMeasurementUnitDisplayNamePlural: "{{ foodMeasurementUnitDisplayNamePlural }}"
foodMeasurementUnit: "{{ foodMeasurementUnit }}"
foodMeasurementUnitDisplayName: "{{ foodMeasurementUnitDisplayName }}"
amount: {{ amount }}
brand: "{{ brand }}"
energyFromFat:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
energyAvg:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
displayName: "{{ displayName }}"
accessLevel: "{{ accessLevel }}"
energyMax:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
nutrients:
- quantity:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
nutrient: "{{ nutrient }}"
description: "{{ description }}"
servings:
- multiplier: {{ multiplier }}
foodMeasurementUnitDisplayNamePlural: "{{ foodMeasurementUnitDisplayNamePlural }}"
foodMeasurementUnit: "{{ foodMeasurementUnit }}"
foodMeasurementUnitDisplayName: "{{ foodMeasurementUnitDisplayName }}"
amount: {{ amount }}
totalFat:
grams: {{ grams }}
userProvidedUnit: "{{ userProvidedUnit }}"
energyMin:
kcal: {{ kcal }}
userProvidedUnit: "{{ userProvidedUnit }}"
mealType: "{{ mealType }}"
- name: altitude
description: |
Optional. Data for points in the `altitude` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
gainMillimeters: "{{ gainMillimeters }}"
- name: swimLengthsData
description: |
Optional. Data for points in the `swim-lengths-data` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
strokeCount: "{{ strokeCount }}"
swimStrokeType: "{{ swimStrokeType }}"
- name: basalEnergyBurned
description: |
Optional. Data for points in the `basal-energy-burned` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
kcal: {{ kcal }}
- name: dailyRespiratoryRate
description: |
Optional. Data for points in the `daily-respiratory-rate` daily data type collection.
value:
breathsPerMinute: {{ breathsPerMinute }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
- name: irregularRhythmNotification
description: |
Optional. Data for points in the `irregular-rhythm-notification` session data type collection.
value:
alertWindows:
- endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
heartBeats: "{{ heartBeats }}"
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
positive: {{ positive }}
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
medicalDeviceInfo:
algorithmVersion: "{{ algorithmVersion }}"
serviceVersion: "{{ serviceVersion }}"
firmwareVersion: "{{ firmwareVersion }}"
featureVersion: "{{ featureVersion }}"
deviceModel: "{{ deviceModel }}"
- name: distance
description: |
Optional. Data for points in the `distance` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
millimeters: "{{ millimeters }}"
- name: exercise
description: |
Optional. Data for points in the `exercise` session data type collection.
value:
splits:
- endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
activeDuration: "{{ activeDuration }}"
metricsSummary:
runVo2Max: {{ runVo2Max }}
mobilityMetrics:
avgStrideLengthMillimeters: "{{ avgStrideLengthMillimeters }}"
avgVerticalRatio: {{ avgVerticalRatio }}
avgCadenceStepsPerMinute: {{ avgCadenceStepsPerMinute }}
avgVerticalOscillationMillimeters: "{{ avgVerticalOscillationMillimeters }}"
avgGroundContactTimeDuration: "{{ avgGroundContactTimeDuration }}"
activeZoneMinutes: "{{ activeZoneMinutes }}"
steps: "{{ steps }}"
averageHeartRateBeatsPerMinute: "{{ averageHeartRateBeatsPerMinute }}"
distanceMillimeters: {{ distanceMillimeters }}
heartRateZoneDurations:
lightTime: "{{ lightTime }}"
vigorousTime: "{{ vigorousTime }}"
moderateTime: "{{ moderateTime }}"
peakTime: "{{ peakTime }}"
averageSpeedMillimetersPerSecond: {{ averageSpeedMillimetersPerSecond }}
caloriesKcal: {{ caloriesKcal }}
totalSwimLengths: {{ totalSwimLengths }}
averagePaceSecondsPerMeter: {{ averagePaceSecondsPerMeter }}
elevationGainMillimeters: {{ elevationGainMillimeters }}
splitType: "{{ splitType }}"
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
createTime: "{{ createTime }}"
notes: "{{ notes }}"
exerciseMetadata:
hasGps: {{ hasGps }}
poolLengthMillimeters: "{{ poolLengthMillimeters }}"
activeDuration: "{{ activeDuration }}"
exerciseEvents:
- exerciseEventType: "{{ exerciseEventType }}"
eventTime: "{{ eventTime }}"
eventUtcOffset: "{{ eventUtcOffset }}"
splitSummaries:
- endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
activeDuration: "{{ activeDuration }}"
metricsSummary:
runVo2Max: {{ runVo2Max }}
mobilityMetrics:
avgStrideLengthMillimeters: "{{ avgStrideLengthMillimeters }}"
avgVerticalRatio: {{ avgVerticalRatio }}
avgCadenceStepsPerMinute: {{ avgCadenceStepsPerMinute }}
avgVerticalOscillationMillimeters: "{{ avgVerticalOscillationMillimeters }}"
avgGroundContactTimeDuration: "{{ avgGroundContactTimeDuration }}"
activeZoneMinutes: "{{ activeZoneMinutes }}"
steps: "{{ steps }}"
averageHeartRateBeatsPerMinute: "{{ averageHeartRateBeatsPerMinute }}"
distanceMillimeters: {{ distanceMillimeters }}
heartRateZoneDurations:
lightTime: "{{ lightTime }}"
vigorousTime: "{{ vigorousTime }}"
moderateTime: "{{ moderateTime }}"
peakTime: "{{ peakTime }}"
averageSpeedMillimetersPerSecond: {{ averageSpeedMillimetersPerSecond }}
caloriesKcal: {{ caloriesKcal }}
totalSwimLengths: {{ totalSwimLengths }}
averagePaceSecondsPerMeter: {{ averagePaceSecondsPerMeter }}
elevationGainMillimeters: {{ elevationGainMillimeters }}
splitType: "{{ splitType }}"
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
displayName: "{{ displayName }}"
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
metricsSummary:
runVo2Max: {{ runVo2Max }}
mobilityMetrics:
avgStrideLengthMillimeters: "{{ avgStrideLengthMillimeters }}"
avgVerticalRatio: {{ avgVerticalRatio }}
avgCadenceStepsPerMinute: {{ avgCadenceStepsPerMinute }}
avgVerticalOscillationMillimeters: "{{ avgVerticalOscillationMillimeters }}"
avgGroundContactTimeDuration: "{{ avgGroundContactTimeDuration }}"
activeZoneMinutes: "{{ activeZoneMinutes }}"
steps: "{{ steps }}"
averageHeartRateBeatsPerMinute: "{{ averageHeartRateBeatsPerMinute }}"
distanceMillimeters: {{ distanceMillimeters }}
heartRateZoneDurations:
lightTime: "{{ lightTime }}"
vigorousTime: "{{ vigorousTime }}"
moderateTime: "{{ moderateTime }}"
peakTime: "{{ peakTime }}"
averageSpeedMillimetersPerSecond: {{ averageSpeedMillimetersPerSecond }}
caloriesKcal: {{ caloriesKcal }}
totalSwimLengths: {{ totalSwimLengths }}
averagePaceSecondsPerMeter: {{ averagePaceSecondsPerMeter }}
elevationGainMillimeters: {{ elevationGainMillimeters }}
updateTime: "{{ updateTime }}"
exerciseType: "{{ exerciseType }}"
- name: floors
description: |
Optional. Data for points in the `floors` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
count: "{{ count }}"
- name: respiratoryRateSleepSummary
description: |
Optional. Data for points in the `respiratory-rate-sleep-summary` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
lightSleepStats:
signalToNoise: {{ signalToNoise }}
breathsPerMinute: {{ breathsPerMinute }}
standardDeviation: {{ standardDeviation }}
deepSleepStats:
signalToNoise: {{ signalToNoise }}
breathsPerMinute: {{ breathsPerMinute }}
standardDeviation: {{ standardDeviation }}
remSleepStats:
signalToNoise: {{ signalToNoise }}
breathsPerMinute: {{ breathsPerMinute }}
standardDeviation: {{ standardDeviation }}
fullSleepStats:
signalToNoise: {{ signalToNoise }}
breathsPerMinute: {{ breathsPerMinute }}
standardDeviation: {{ standardDeviation }}
- name: foodMeasurementUnit
description: |
Optional. The food measurement unit details.
value:
displayName: "{{ displayName }}"
pluralDisplayName: "{{ pluralDisplayName }}"
- name: activityLevel
description: |
Optional. Data for points in the `activity-level` daily data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
activityLevelType: "{{ activityLevelType }}"
- name: timeInHeartRateZone
description: |
Optional. Data for points in the `time-in-heart-rate-zone` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
heartRateZoneType: "{{ heartRateZoneType }}"
- name: dailySleepTemperatureDerivations
description: |
Optional. Data for points in the `daily-sleep-temperature-derivations` daily data type collection.
value:
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
baselineTemperatureCelsius: {{ baselineTemperatureCelsius }}
nightlyTemperatureCelsius: {{ nightlyTemperatureCelsius }}
relativeNightlyStddev30dCelsius: {{ relativeNightlyStddev30dCelsius }}
- name: height
description: |
Optional. Data for points in the `height` sample data type collection.
value:
heightMillimeters: "{{ heightMillimeters }}"
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
- name: name
value: "{{ name }}"
description: |
Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
- name: electrocardiogram
description: |
Optional. Data for points in the `electrocardiogram` session data type collection.
value:
beatsPerMinuteAvg: "{{ beatsPerMinuteAvg }}"
millivoltsScalingFactor: {{ millivoltsScalingFactor }}
interval:
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
resultClassification: "{{ resultClassification }}"
waveformSamples:
- {{ waveformSamples }}
samplingFrequencyHertz: {{ samplingFrequencyHertz }}
leadNumber: {{ leadNumber }}
medicalDeviceInfo:
algorithmVersion: "{{ algorithmVersion }}"
serviceVersion: "{{ serviceVersion }}"
firmwareVersion: "{{ firmwareVersion }}"
featureVersion: "{{ featureVersion }}"
deviceModel: "{{ deviceModel }}"
- name: activeZoneMinutes
description: |
Optional. Data for points in the `active-zone-minutes` interval data type collection, measured in minutes.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
activeZoneMinutes: "{{ activeZoneMinutes }}"
heartRateZone: "{{ heartRateZone }}"
- name: coreBodyTemperature
description: |
Optional. Data for points in the `core-body-temperature` sample data type collection.
value:
temperatureCelsius: {{ temperatureCelsius }}
measurementLocation: "{{ measurementLocation }}"
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
id: "{{ id }}"
- name: sedentaryPeriod
description: |
Optional. Data for points in the `sedentary-period` interval data type collection.
value:
interval:
civilEndTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
startTime: "{{ startTime }}"
startUtcOffset: "{{ startUtcOffset }}"
civilStartTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
endTime: "{{ endTime }}"
endUtcOffset: "{{ endUtcOffset }}"
- name: dailyHeartRateZones
description: |
Optional. Data for points in the `daily-heart-rate-zones` daily data type collection.
value:
heartRateZones:
- minBeatsPerMinute: "{{ minBeatsPerMinute }}"
maxBeatsPerMinute: "{{ maxBeatsPerMinute }}"
heartRateZoneType: "{{ heartRateZoneType }}"
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
- name: dataSource
description: |
Optional. Data source information for the metric
value:
device:
manufacturer: "{{ manufacturer }}"
formFactor: "{{ formFactor }}"
displayName: "{{ displayName }}"
application:
packageName: "{{ packageName }}"
googleWebClientId: "{{ googleWebClientId }}"
webClientId: "{{ webClientId }}"
recordingMethod: "{{ recordingMethod }}"
platform: "{{ platform }}"
- name: bodyFat
description: |
Optional. Data for points in the `body-fat` sample data type collection.
value:
sampleTime:
physicalTime: "{{ physicalTime }}"
civilTime:
time:
seconds: {{ seconds }}
minutes: {{ minutes }}
nanos: {{ nanos }}
hours: {{ hours }}
date:
month: {{ month }}
day: {{ day }}
year: {{ year }}
utcOffset: "{{ utcOffset }}"
percentage: {{ percentage }}
UPDATE examples
- patch
Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.
UPDATE google.health.data_points
SET
data__activeEnergyBurned = '{{ activeEnergyBurned }}',
data__heartRate = '{{ heartRate }}',
data__dailyVo2Max = '{{ dailyVo2Max }}',
data__steps = '{{ steps }}',
data__runVo2Max = '{{ runVo2Max }}',
data__vo2Max = '{{ vo2Max }}',
data__dailyRestingHeartRate = '{{ dailyRestingHeartRate }}',
data__bloodGlucose = '{{ bloodGlucose }}',
data__activeMinutes = '{{ activeMinutes }}',
data__dailyHeartRateVariability = '{{ dailyHeartRateVariability }}',
data__oxygenSaturation = '{{ oxygenSaturation }}',
data__hydrationLog = '{{ hydrationLog }}',
data__nutritionLog = '{{ nutritionLog }}',
data__heartRateVariability = '{{ heartRateVariability }}',
data__weight = '{{ weight }}',
data__sleep = '{{ sleep }}',
data__dailyOxygenSaturation = '{{ dailyOxygenSaturation }}',
data__food = '{{ food }}',
data__altitude = '{{ altitude }}',
data__swimLengthsData = '{{ swimLengthsData }}',
data__basalEnergyBurned = '{{ basalEnergyBurned }}',
data__dailyRespiratoryRate = '{{ dailyRespiratoryRate }}',
data__irregularRhythmNotification = '{{ irregularRhythmNotification }}',
data__distance = '{{ distance }}',
data__exercise = '{{ exercise }}',
data__floors = '{{ floors }}',
data__respiratoryRateSleepSummary = '{{ respiratoryRateSleepSummary }}',
data__foodMeasurementUnit = '{{ foodMeasurementUnit }}',
data__activityLevel = '{{ activityLevel }}',
data__timeInHeartRateZone = '{{ timeInHeartRateZone }}',
data__dailySleepTemperatureDerivations = '{{ dailySleepTemperatureDerivations }}',
data__height = '{{ height }}',
data__name = '{{ name }}',
data__electrocardiogram = '{{ electrocardiogram }}',
data__activeZoneMinutes = '{{ activeZoneMinutes }}',
data__coreBodyTemperature = '{{ coreBodyTemperature }}',
data__sedentaryPeriod = '{{ sedentaryPeriod }}',
data__dailyHeartRateZones = '{{ dailyHeartRateZones }}',
data__dataSource = '{{ dataSource }}',
data__bodyFat = '{{ bodyFat }}'
WHERE
usersId = '{{ usersId }}' --required
AND dataTypesId = '{{ dataTypesId }}' --required
AND dataPointsId = '{{ dataPointsId }}' --required
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- batch_delete
Delete a batch of identifyable data points.
DELETE FROM google.health.data_points
WHERE usersId = '{{ usersId }}' --required
AND dataTypesId = '{{ dataTypesId }}' --required
;
Lifecycle Methods
- reconcile
- export_exercise_tcx
- roll_up
- daily_roll_up
Reconcile data points from multiple data sources into a single data stream.
EXEC google.health.data_points.reconcile
@usersId='{{ usersId }}' --required,
@dataTypesId='{{ dataTypesId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@filter='{{ filter }}',
@dataSourceFamily='{{ dataSourceFamily }}'
;
Exports exercise data in TCX format. IMPORTANT: HTTP clients must append ?alt=media to the request URL to download the raw TCX file. Example: https://health.googleapis.com/v4/users/me/dataTypes/exercise/dataPoints/EXERCISE_ID:exportExerciseTcx?alt=media Without alt=media, the server returns a JSON response (ExportExerciseTcxResponse) which is intended primarily for gRPC clients. Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the activity_and_fitness scopes (normal or readonly) AND one of the location scopes (normal or readonly) in their access token to succeed.
EXEC google.health.data_points.export_exercise_tcx
@usersId='{{ usersId }}' --required,
@dataTypesId='{{ dataTypesId }}' --required,
@dataPointsId='{{ dataPointsId }}' --required,
@partialData={{ partialData }}
;
Roll up data points over physical time intervals for supported data types.
EXEC google.health.data_points.roll_up
@usersId='{{ usersId }}' --required,
@dataTypesId='{{ dataTypesId }}' --required
@@json=
'{
"dataSourceFamily": "{{ dataSourceFamily }}",
"range": "{{ range }}",
"windowSize": "{{ windowSize }}",
"pageSize": {{ pageSize }},
"pageToken": "{{ pageToken }}"
}'
;
Roll up data points over civil time intervals for supported data types.
EXEC google.health.data_points.daily_roll_up
@usersId='{{ usersId }}' --required,
@dataTypesId='{{ dataTypesId }}' --required
@@json=
'{
"pageSize": {{ pageSize }},
"pageToken": "{{ pageToken }}",
"windowSizeDays": {{ windowSizeDays }},
"range": "{{ range }}",
"dataSourceFamily": "{{ dataSourceFamily }}"
}'
;