REST Resource: users.dataTypes.dataPoints

Resource: DataPoint

A computed or recorded metric.

JSON representation
{
  "name": string,
  "dataSource": {
    object (DataSource)
  },

  // Union field data can be only one of the following:
  "steps": {
    object (Steps)
  },
  "floors": {
    object (Floors)
  },
  "heartRate": {
    object (HeartRate)
  },
  "sleep": {
    object (Sleep)
  },
  "dailyRestingHeartRate": {
    object (DailyRestingHeartRate)
  },
  "dailyHeartRateVariability": {
    object (DailyHeartRateVariability)
  },
  "exercise": {
    object (Exercise)
  },
  "weight": {
    object (Weight)
  },
  "altitude": {
    object (Altitude)
  },
  "distance": {
    object (Distance)
  },
  "bodyFat": {
    object (BodyFat)
  },
  "activeZoneMinutes": {
    object (ActiveZoneMinutes)
  },
  "heartRateVariability": {
    object (HeartRateVariability)
  },
  "dailySleepTemperatureDerivations": {
    object (DailySleepTemperatureDerivations)
  },
  "sedentaryPeriod": {
    object (SedentaryPeriod)
  },
  "runVo2Max": {
    object (RunVO2Max)
  },
  "oxygenSaturation": {
    object (OxygenSaturation)
  },
  "dailyOxygenSaturation": {
    object (DailyOxygenSaturation)
  },
  "activityLevel": {
    object (ActivityLevel)
  },
  "vo2Max": {
    object (VO2Max)
  },
  "dailyVo2Max": {
    object (DailyVO2Max)
  },
  "dailyHeartRateZones": {
    object (DailyHeartRateZones)
  },
  "hydrationLog": {
    object (HydrationLog)
  },
  "timeInHeartRateZone": {
    object (TimeInHeartRateZone)
  },
  "activeMinutes": {
    object (ActiveMinutes)
  },
  "respiratoryRateSleepSummary": {
    object (RespiratoryRateSleepSummary)
  },
  "dailyRespiratoryRate": {
    object (DailyRespiratoryRate)
  }
  // End of list of possible types for union field data.
}
Fields
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/{dataType}/dataPoints/{dataPoint}

Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef

The {user} ID is a system-generated identifier, as described in [Profile.encoded_id][google.devicesandservices.health.v4.Profile.encoded_id].

The {dataType} ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. total-calories for the totalCalories field.

The {dataPoint} 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.

dataSource

object (DataSource)

Optional. Data source information for the metric

Union field data. Data type component in the name field will always correspond to the data field set. These messages represent the data payload for each data type and are embedded within the DataPoint resource. They are not standalone resources themselves. data can be only one of the following:
steps

object (Steps)

Data for points in the steps interval data type collection.

floors

object (Floors)

Data for points in the floors interval data type collection.

heartRate

object (HeartRate)

Data for points in the heart-rate sample data type collection.

sleep

object (Sleep)

Data for points in the sleep session data type collection.

dailyRestingHeartRate

object (DailyRestingHeartRate)

Data for points in the daily-resting-heart-rate daily data type collection.

dailyHeartRateVariability

object (DailyHeartRateVariability)

Data for points in the daily-heart-rate-variability daily data type collection.

exercise

object (Exercise)

Data for points in the exercise session data type collection.

weight

object (Weight)

Data for points in the weight sample data type collection.

altitude

object (Altitude)

Data for points in the altitude interval data type collection.

distance

object (Distance)

Data for points in the distance interval data type collection.

bodyFat

object (BodyFat)

Data for points in the body-fat sample data type collection.

activeZoneMinutes

object (ActiveZoneMinutes)

Data for points in the active-zone-minutes interval data type collection, measured in minutes.

heartRateVariability

object (HeartRateVariability)

Data for points in the heart-rate-variability sample data type collection.

dailySleepTemperatureDerivations

object (DailySleepTemperatureDerivations)

Data for points in the daily-sleep-temperature-derivations daily data type collection.

sedentaryPeriod

object (SedentaryPeriod)

Data for points in the sedentary-period interval data type collection.

runVo2Max

object (RunVO2Max)

Data for points in the run-vo2-max sample data type collection.

oxygenSaturation

object (OxygenSaturation)

Data for points in the oxygen-saturation sample data type collection.

dailyOxygenSaturation

object (DailyOxygenSaturation)

Data for points in the daily-oxygen-saturation daily data type collection.

activityLevel

object (ActivityLevel)

Data for points in the activity-level daily data type collection.

vo2Max

object (VO2Max)

Data for points in the vo2-max sample data type collection.

dailyVo2Max

object (DailyVO2Max)

Data for points in the daily-vo2-max daily data type collection.

dailyHeartRateZones

object (DailyHeartRateZones)

Data for points in the daily-heart-rate-zones daily data type collection.

hydrationLog

object (HydrationLog)

Data for points in the hydration-log session data type collection.

timeInHeartRateZone

object (TimeInHeartRateZone)

Data for points in the time-in-heart-rate-zone interval data type collection.

activeMinutes

object (ActiveMinutes)

Data for points in the active-minutes interval data type collection.

respiratoryRateSleepSummary

object (RespiratoryRateSleepSummary)

Data for points in the respiratory-rate-sleep-summary sample data type collection.

dailyRespiratoryRate

object (DailyRespiratoryRate)

Data for points in the daily-respiratory-rate daily data type collection.

Steps

Step count over the time interval.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "count": string
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

count

string (int64 format)

Required. Number of steps in the recorded interval.

ObservationTimeInterval

Represents a time interval of an observed data point.

JSON representation
{
  "startTime": string,
  "startUtcOffset": string,
  "endTime": string,
  "endUtcOffset": string,
  "civilStartTime": {
    object (CivilDateTime)
  },
  "civilEndTime": {
    object (CivilDateTime)
  }
}
Fields
startTime

string (Timestamp format)

Required. Observed interval start time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startUtcOffset

string (Duration format)

Required. The offset of the user's local time at the start of the observation relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endTime

string (Timestamp format)

Required. Observed interval end time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endUtcOffset

string (Duration format)

Required. The offset of the user's local time at the end of the observation relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

civilStartTime

object (CivilDateTime)

Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval

civilEndTime

object (CivilDateTime)

Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval

CivilDateTime

Civil time representation similar to google.type.DateTime, but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries.

JSON representation
{
  "date": {
    object (Date)
  },
  "time": {
    object (TimeOfDay)
  }
}
Fields
date

object (Date)

Required. Calendar date.

time

object (TimeOfDay)

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values.
  • A month and day, with a zero year (for example, an anniversary).
  • A year on its own, with a zero month and a zero day.
  • A year and month, with a zero day (for example, a credit card expiration date).

Related types:

JSON representation
{
  "year": integer,
  "month": integer,
  "day": integer
}
Fields
year

integer

Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

month

integer

Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

day

integer

Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

JSON representation
{
  "hours": integer,
  "minutes": integer,
  "seconds": integer,
  "nanos": integer
}
Fields
hours

integer

Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

minutes

integer

Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.

seconds

integer

Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.

nanos

integer

Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.

Floors

Gained elevation measured in floors over the time interval

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "count": string
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval

count

string (int64 format)

Required. Number of floors in the recorded interval

HeartRate

A heart rate measurement.

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "beatsPerMinute": string,
  "metadata": {
    object (HeartRate.HeartRateMetadata)
  }
}
Fields
sampleTime

object (ObservationSampleTime)

Required. Observation time

beatsPerMinute

string (int64 format)

Required. The heart rate value in beats per minute.

metadata

object (HeartRate.HeartRateMetadata)

Optional. Metadata about the heart rate sample.

ObservationSampleTime

Represents a sample time of an observed data point.

JSON representation
{
  "physicalTime": string,
  "utcOffset": string,
  "civilTime": {
    object (CivilDateTime)
  }
}
Fields
physicalTime

string (Timestamp format)

Required. The time of the observation.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

utcOffset

string (Duration format)

Required. The offset of the user's local time during the observation relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

civilTime

object (CivilDateTime)

Output only. The civil time in the timezone the subject is in at the time of the observation.

HeartRate.HeartRateMetadata

Heart rate metadata.

JSON representation
{
  "motionContext": enum (HeartRate.HeartRateMetadata.MotionContext),
  "sensorLocation": enum (HeartRate.HeartRateMetadata.SensorLocation)
}
Fields
motionContext

enum (HeartRate.HeartRateMetadata.MotionContext)

Optional. Indicates the user’s level of activity when the heart rate sample was measured

sensorLocation

enum (HeartRate.HeartRateMetadata.SensorLocation)

Optional. Indicates the location of the sensor that measured the heart rate.

HeartRate.HeartRateMetadata.MotionContext

The user’s level of activity when the heart rate sample was measured.

Enums
MOTION_CONTEXT_UNSPECIFIED The default value when no data is available.
ACTIVE The user is active.
SEDENTARY The user is inactive.

HeartRate.HeartRateMetadata.SensorLocation

The location of the sensor that measured the heart rate.

Enums
SENSOR_LOCATION_UNSPECIFIED The default value when no data is available.
CHEST Chest sensor.
WRIST Wrist sensor.
FINGER Finger sensor.
HAND Hand sensor.
EAR_LOBE Ear lobe sensor.
FOOT Foot sensor.

Sleep

A sleep session possibly including stages.

JSON representation
{
  "interval": {
    object (SessionTimeInterval)
  },
  "stages": [
    {
      object (Sleep.SleepStage)
    }
  ],
  "outOfBedSegments": [
    {
      object (Sleep.OutOfBedSegment)
    }
  ],
  "metadata": {
    object (Sleep.SleepMetadata)
  },
  "summary": {
    object (Sleep.SleepSummary)
  },
  "createTime": string,
  "updateTime": string,
  "type": enum (Sleep.SleepType)
}
Fields
interval

object (SessionTimeInterval)

Required. Observed sleep interval.

stages[]

object (Sleep.SleepStage)

Optional. List of non-overlapping contiguous sleep stage segments that cover the sleep period.

outOfBedSegments[]

object (Sleep.OutOfBedSegment)

Optional. “Out of bed” segments that can overlap with sleep stages.

metadata

object (Sleep.SleepMetadata)

Optional. Sleep metadata: processing, main, manually edited, stages status.

summary

object (Sleep.SleepSummary)

Output only. Sleep summary: metrics and stages summary.

createTime

string (Timestamp format)

Output only. Creation time of this sleep observation.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Last update time of this sleep observation.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

type

enum (Sleep.SleepType)

Optional. SleepType: classic or stages.

SessionTimeInterval

Represents a time interval of session data point, which bundles multiple observed metrics together.

JSON representation
{
  "startTime": string,
  "startUtcOffset": string,
  "endTime": string,
  "endUtcOffset": string,
  "civilStartTime": {
    object (CivilDateTime)
  },
  "civilEndTime": {
    object (CivilDateTime)
  }
}
Fields
startTime

string (Timestamp format)

Required. The start time of the observed session.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startUtcOffset

string (Duration format)

Required. The offset of the user's local time at the start of the session relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endTime

string (Timestamp format)

Required. The end time of the observed session.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endUtcOffset

string (Duration format)

Required. The offset of the user's local time at the end of the session relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

civilStartTime

object (CivilDateTime)

Output only. Session start time in civil time in the timezone the subject is in at the start of the session.

civilEndTime

object (CivilDateTime)

Output only. Session end time in civil time in the timezone the subject is in at the end of the session.

Sleep.SleepType

Sleep type: classic or stages.

Enums
SLEEP_TYPE_UNSPECIFIED Sleep type is unspecified.
CLASSIC Classic sleep is a sleep with 3 stages types: AWAKE, RESTLESS and ASLEEP.
STAGES On top of "classic" sleep stages an additional processing pass can calculate stages more precisely, overwriting the prior stages with AWAKE, LIGHT, REM and DEEP.

Sleep.SleepStage

Sleep stage segment.

JSON representation
{
  "startTime": string,
  "startUtcOffset": string,
  "endTime": string,
  "endUtcOffset": string,
  "type": enum (Sleep.SleepStageType),
  "createTime": string,
  "updateTime": string
}
Fields
startTime

string (Timestamp format)

Required. Sleep stage start time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startUtcOffset

string (Duration format)

Required. The offset of the user's local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endTime

string (Timestamp format)

Required. Sleep stage end time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endUtcOffset

string (Duration format)

Required. The offset of the user's local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

type

enum (Sleep.SleepStageType)

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

createTime

string (Timestamp format)

Output only. Creation time of this sleep stages segment.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Last update time of this sleep stages segment.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Sleep.SleepStageType

Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

Enums
SLEEP_STAGE_TYPE_UNSPECIFIED The default unset value.
AWAKE Sleep stage AWAKE.
LIGHT Sleep stage LIGHT.
DEEP Sleep stage DEEP.
REM Sleep stage REM.
ASLEEP Sleep stage ASLEEP.
RESTLESS Sleep stage RESTLESS.

Sleep.OutOfBedSegment

A time interval to represent an out-of-bed segment.

JSON representation
{
  "startTime": string,
  "startUtcOffset": string,
  "endTime": string,
  "endUtcOffset": string
}
Fields
startTime

string (Timestamp format)

Required. Segment tart time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startUtcOffset

string (Duration format)

Required. The offset of the user's local time at the start of the segment relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endTime

string (Timestamp format)

Required. Segment end time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endUtcOffset

string (Duration format)

Required. The offset of the user's local time at the end of the segment relative to the Coordinated Universal Time (UTC).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Sleep.SleepMetadata

Additional information about how the sleep was processed.

JSON representation
{
  "nap": boolean,
  "manuallyEdited": boolean,
  "stagesStatus": enum (Sleep.SleepMetadata.StagesState),
  "processed": boolean,
  "externalId": string
}
Fields
nap

boolean

Output only. Naps are sleeps without stages and relatively short durations.

manuallyEdited

boolean

Output only. Some sleeps autodetected by algorithms can be manually edited by users.

stagesStatus

enum (Sleep.SleepMetadata.StagesState)

Output only. Sleep stages algorithm processing status.

processed

boolean

Output only. Sleep and sleep stages algorithms finished processing.

externalId

string

Optional. Sleep identifier relevant in the context of the data source.

Sleep.SleepMetadata.StagesState

Sleep stages algorithm processing status.

Enums
STAGES_STATE_UNSPECIFIED Output only. Sleep stages status is unspecified.
REJECTED_COVERAGE Output only. Sleep stages cannot be computed due to low RR coverage.
REJECTED_MAX_GAP Output only. Sleep stages cannot be computed due to the large middle gap (2h).
REJECTED_START_GAP Output only. Sleep stages cannot be computed due to the large start gap (1h).
REJECTED_END_GAP Output only. Sleep stages cannot be computed due to the large end gap (1h).
REJECTED_NAP Output only. Sleep stages cannot be computed because the sleep log is a nap (has < 3h duration).
REJECTED_SERVER Output only. Sleep stages cannot be computed because input data is not available (PPGV2, wake magnitude, etc).
TIMEOUT Output only. Sleep stages cannot be computed due to server timeout.
SUCCEEDED Output only. Sleep stages successfully computed.
PROCESSING_INTERNAL_ERROR Output only. Sleep stages cannot be computed due to server internal error.

Sleep.SleepSummary

Sleep summary: metrics and stages summary.

JSON representation
{
  "stagesSummary": [
    {
      object (Sleep.SleepSummary.StageSummary)
    }
  ],
  "minutesInSleepPeriod": string,
  "minutesAfterWakeUp": string,
  "minutesToFallAsleep": string,
  "minutesAsleep": string,
  "minutesAwake": string
}
Fields
stagesSummary[]

object (Sleep.SleepSummary.StageSummary)

Output only. List of summaries (total duration and segment count) per each sleep stage type.

minutesInSleepPeriod

string (int64 format)

Output only. Delta between wake time and bedtime. It is the sum of all stages.

minutesAfterWakeUp

string (int64 format)

Output only. Minutes after wake up calculated by restlessness algorithm.

minutesToFallAsleep

string (int64 format)

Output only. Minutes to fall asleep calculated by restlessness algorithm.

minutesAsleep

string (int64 format)

Output only. Total number of minutes asleep. For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages (excluding AWAKE).

minutesAwake

string (int64 format)

Output only. Total number of minutes awake. It is a sum of all AWAKE stages.

Sleep.SleepSummary.StageSummary

Total duration and segment count for a stage.

JSON representation
{
  "type": enum (Sleep.SleepStageType),
  "minutes": string,
  "count": string
}
Fields
type

enum (Sleep.SleepStageType)

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

minutes

string (int64 format)

Output only. Total duration in minutes of a sleep stage.

count

string (int64 format)

Output only. Number of sleep stages segments.

DailyRestingHeartRate

Measures the daily resting heart rate for a user, calculated using the all day heart rate measurements.

JSON representation
{
  "date": {
    object (Date)
  },
  "beatsPerMinute": string,
  "dailyRestingHeartRateMetadata": {
    object (DailyRestingHeartRate.DailyRestingHeartRateMetadata)
  }
}
Fields
date

object (Date)

Required. Date (in the user's timezone) of the resting heart rate measurement.

beatsPerMinute

string (int64 format)

Required. The resting heart rate value in beats per minute.

dailyRestingHeartRateMetadata

object (DailyRestingHeartRate.DailyRestingHeartRateMetadata)

Optional. Metadata for the daily resting heart rate.

DailyRestingHeartRate.DailyRestingHeartRateMetadata

Metadata for the daily resting heart rate.

JSON representation
{
  "calculationMethod": enum (DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod)
}
Fields
calculationMethod

enum (DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod)

Required. The method used to calculate the resting heart rate.

DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod

The method used to calculate the resting heart rate.

Enums
CALCULATION_METHOD_UNSPECIFIED The calculation method is unspecified.
WITH_SLEEP The resting heart rate is calculated using the sleep data.
ONLY_WITH_AWAKE_DATA The resting heart rate is calculated using only awake data.

DailyHeartRateVariability

Represents the daily heart rate variability data type.

At least one of the following fields must be set:

  • averageHeartRateVariabilityMilliseconds
  • nonRemHeartRateBeatsPerMinute
  • entropy
  • deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds
JSON representation
{
  "date": {
    object (Date)
  },
  "averageHeartRateVariabilityMilliseconds": number,
  "nonRemHeartRateBeatsPerMinute": string,
  "entropy": number,
  "deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds": number
}
Fields
date

object (Date)

Required. Date (in the user's timezone) of heart rate variability measurement.

averageHeartRateVariabilityMilliseconds

number

Optional. A user's average heart rate variability calculated using the root mean square of successive differences (RMSSD) in times between heartbeats.

nonRemHeartRateBeatsPerMinute

string (int64 format)

Optional. Non-REM heart rate

entropy

number

Optional. The Shanon entropy of heartbeat intervals. Entropy quantifies randomness or disorder in a system. High entropy indicates high HRV. Entropy is measured from the histogram of time interval between successive heart beats values measured during sleep.

deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds

number

Optional. The root mean square of successive differences (RMSSD) value during deep sleep.

Exercise

An exercise that stores information about a physical activity.

JSON representation
{
  "exerciseType": enum (Exercise.ExerciseType),
  "splits": [
    {
      object (Exercise.SplitSummary)
    }
  ],
  "exerciseEvents": [
    {
      object (Exercise.ExerciseEvent)
    }
  ],
  "splitSummaries": [
    {
      object (Exercise.SplitSummary)
    }
  ],
  "metricsSummary": {
    object (MetricsSummary)
  },
  "displayName": string,
  "updateTime": string,
  "createTime": string,
  "interval": {
    object (SessionTimeInterval)
  },
  "exerciseMetadata": {
    object (Exercise.ExerciseMetadata)
  },
  "activeDuration": string,
  "notes": string
}
Fields
exerciseType

enum (Exercise.ExerciseType)

Required. The type of activity performed during an exercise.

splits[]

object (Exercise.SplitSummary)

Optional. The default split is 1 km or 1 mile. - if the movement distance is less than the default, then there are no splits - if the movement distance is greater than or equal to the default, then we have splits

exerciseEvents[]

object (Exercise.ExerciseEvent)

Optional. Exercise events that happen during an exercise, such as pause & restarts.

splitSummaries[]

object (Exercise.SplitSummary)

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

metricsSummary

object (MetricsSummary)

Required. Summary metrics for this exercise ( )

displayName

string

Required. Exercise display name.

updateTime

string (Timestamp format)

Output only. This is the timestamp of the last update to the exercise.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

createTime

string (Timestamp format)

Output only. Represents the timestamp of the creation of the exercise.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

interval

object (SessionTimeInterval)

Required. Observed exercise interval

exerciseMetadata

object (Exercise.ExerciseMetadata)

Optional. Additional exercise metadata.

activeDuration

string (Duration format)

Optional. Duration excluding pauses.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

notes

string

Optional. Standard free-form notes captured at manual logging.

Exercise.ExerciseType

The type of activity performed during an exercise.

Enums
EXERCISE_TYPE_UNSPECIFIED Exercise type is unspecified.
RUNNING Running type.
WALKING Walking type.
BIKING Biking type.
SWIMMING Swimming type.
HIKING Hiking type.
YOGA Yoga type.
PILATES Pilates type.
WORKOUT Workout type.
HIIT HIIT type.
WEIGHTLIFTING Weightlifting type.
STRENGTH_TRAINING Strength training type.
OTHER Other type.

Exercise.SplitSummary

Represents splits or laps recorded within an exercise. Lap events partition a workout into segments based on criteria like distance, time, or calories.

JSON representation
{
  "startTime": string,
  "startUtcOffset": string,
  "endTime": string,
  "endUtcOffset": string,
  "activeDuration": string,
  "metricsSummary": {
    object (MetricsSummary)
  },
  "splitType": enum (Exercise.SplitSummary.SplitType)
}
Fields
startTime

string (Timestamp format)

Required. Lap start time

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startUtcOffset

string (Duration format)

Required. Lap start time offset from UTC

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endTime

string (Timestamp format)

Required. Lap end time

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endUtcOffset

string (Duration format)

Required. Lap end time offset from UTC

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

activeDuration

string (Duration format)

Output only. Lap time excluding the pauses.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

metricsSummary

object (MetricsSummary)

Required. Summary metrics for this split.

splitType

enum (Exercise.SplitSummary.SplitType)

Required. Method used to split the exercise laps. Users may manually mark the lap as complete even if the tracking is automatic.

MetricsSummary

Summary metrics for an exercise.

JSON representation
{
  "caloriesKcal": number,
  "distanceMillimeters": number,
  "steps": string,
  "averageSpeedMillimetersPerSecond": number,
  "averagePaceSecondsPerMeter": number,
  "averageHeartRateBeatsPerMinute": string,
  "elevationGainMillimeters": number,
  "activeZoneMinutes": string,
  "runVo2Max": number,
  "totalSwimLengths": number,
  "heartRateZoneDurations": {
    object (MetricsSummary.TimeInHeartRateZones)
  },
  "mobilityMetrics": {
    object (MetricsSummary.MobilityMetrics)
  }
}
Fields
caloriesKcal

number

Optional. Total calories burned by the user during the exercise.

distanceMillimeters

number

Optional. Total distance covered by the user during the exercise.

steps

string (int64 format)

Optional. Total steps taken during the exercise.

averageSpeedMillimetersPerSecond

number

Optional. Average speed in millimeters per second.

averagePaceSecondsPerMeter

number

Optional. Average pace in seconds per meter.

averageHeartRateBeatsPerMinute

string (int64 format)

Optional. Average heart rate during the exercise.

elevationGainMillimeters

number

Optional. Total elevation gain during the exercise.

activeZoneMinutes

string (int64 format)

Optional. Total active zone minutes for the exercise.

runVo2Max

number

Optional. Run VO2 max value for the exercise. Only present in the running exercises at the top level as in the summary of the whole exercise.

totalSwimLengths

number

Optional. Number of full pool lengths completed during the exercise. Only present in the swimming exercises at the top level as in the summary of the whole exercise.

heartRateZoneDurations

object (MetricsSummary.TimeInHeartRateZones)

Optional. Time spent in each heart rate zone.

mobilityMetrics

object (MetricsSummary.MobilityMetrics)

Optional. Mobility workouts specific metrics. Only present in the advanced running exercises.

MetricsSummary.TimeInHeartRateZones

Time spent in each heart rate zone.

JSON representation
{
  "lightTime": string,
  "moderateTime": string,
  "vigorousTime": string,
  "peakTime": string
}
Fields
lightTime

string (Duration format)

Optional. Time spent in light heart rate zone.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

moderateTime

string (Duration format)

Optional. Time spent in moderate heart rate zone.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

vigorousTime

string (Duration format)

Optional. Time spent in vigorous heart rate zone.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

peakTime

string (Duration format)

Optional. Time spent in peak heart rate zone.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

MetricsSummary.MobilityMetrics

Mobility workouts specific metrics

JSON representation
{
  "avgCadenceStepsPerMinute": number,
  "avgStrideLengthMillimeters": string,
  "avgVerticalOscillationMillimeters": string,
  "avgVerticalRatio": number,
  "avgGroundContactTimeDuration": string
}
Fields
avgCadenceStepsPerMinute

number

Optional. Cadence is a measure of the frequency of your foot strikes. Steps / min in real time during workout.

avgStrideLengthMillimeters

string (int64 format)

Optional. Stride length is a measure of the distance covered by a single stride

avgVerticalOscillationMillimeters

string (int64 format)

Optional. Distance off the ground your center of mass moves with each stride while running

avgVerticalRatio

number

Optional. Vertical oscillation/stride length between [5.0, 11.0].

avgGroundContactTimeDuration

string (Duration format)

Optional. The ground contact time for a particular stride is the amount of time for which the foot was in contact with the ground on that stride

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Exercise.SplitSummary.SplitType

The type of the split, such as manual, duration, distance, calories.

Enums
SPLIT_TYPE_UNSPECIFIED Split type is unspecified.
MANUAL Manual split.
DURATION Split by duration.
DISTANCE Split by distance.
CALORIES Split by calories.

Exercise.ExerciseEvent

Represents instantaneous events that happen during an exercise, such as start, stop, pause, split.

JSON representation
{
  "eventTime": string,
  "eventUtcOffset": string,
  "exerciseEventType": enum (Exercise.ExerciseEvent.ExerciseEventType)
}
Fields
eventTime

string (Timestamp format)

Required. Exercise event time

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

eventUtcOffset

string (Duration format)

Required. Exercise event time offset from UTC

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

exerciseEventType

enum (Exercise.ExerciseEvent.ExerciseEventType)

Required. The type of the event, such as start, stop, pause, resume.

Exercise.ExerciseEvent.ExerciseEventType

The type of the event, such as start, stop, pause, resume.

Enums
EXERCISE_EVENT_TYPE_UNSPECIFIED Exercise event type is unspecified.
START Exercise start event.
STOP Exercise stop event.
PAUSE Exercise pause event.
RESUME Exercise resume event.
AUTO_PAUSE Exercise auto-pause event.
AUTO_RESUME Exercise auto-resume event.

Exercise.ExerciseMetadata

Additional exercise metadata.

JSON representation
{
  "poolLengthMillimeters": string,
  "hasGps": boolean
}
Fields
poolLengthMillimeters

string (int64 format)

Optional. Pool length in millimeters. Only present in the swimming exercises.

hasGps

boolean

Optional. Whether the exercise had GPS tracking.

Weight

Body weight measurement.

JSON representation
{
  "weightGrams": number,
  "notes": string,
  "sampleTime": {
    object (ObservationSampleTime)
  }
}
Fields
weightGrams

number

Required. Weight of a user in grams.

notes

string

Optional. Standard free-form notes captured at manual logging.

sampleTime

object (ObservationSampleTime)

Required. The time at which the weight was measured

Altitude

Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "gainMillimeters": string
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

gainMillimeters

string (int64 format)

Required. Altitude gain in millimeters over the observed interval.

Distance

Distance traveled over an interval of time.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "millimeters": string
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

millimeters

string (int64 format)

Required. Distance in millimeters over the observed interval.

BodyFat

Body fat measurement.

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "percentage": number
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time at which body fat was measured.

percentage

number

Required. Body fat percentage, in range [0, 100].

ActiveZoneMinutes

Record of active zone minutes in a given time interval.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "heartRateZone": enum (ActiveZoneMinutes.HeartRateZone),
  "activeZoneMinutes": string
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

heartRateZone

enum (ActiveZoneMinutes.HeartRateZone)

Required. Heart rate zone in which the active zone minutes have been earned, in the given time interval.

activeZoneMinutes

string (int64 format)

Required. Number of Active Zone Minutes earned in the given time interval. Note: activeZoneMinutes equals to 1 for low intensity (fat burn) zones or 2 for high intensity zones (cardio, peak).

ActiveZoneMinutes.HeartRateZone

Represents different heart rate zones.

Enums
HEART_RATE_ZONE_UNSPECIFIED Unspecified heart rate zone.
FAT_BURN The fat burn heart rate zone.
CARDIO The cardio heart rate zone.
PEAK The peak heart rate zone.

HeartRateVariability

Captures user's heart rate variability (HRV) as measured by the root mean square of successive differences (RMSSD) between normal heartbeats or by standard deviation of the inter-beat intervals (SDNN).

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "rootMeanSquareOfSuccessiveDifferencesMilliseconds": number,
  "standardDeviationMilliseconds": number
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time of the heart rate variability measurement.

rootMeanSquareOfSuccessiveDifferencesMilliseconds

number

Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Fitbit.

standardDeviationMilliseconds

number

Optional. The standard deviation of the heart rate variability measurement.

DailySleepTemperatureDerivations

Provides derived sleep temperature values, calculated from skin or internal device temperature readings during sleep.

JSON representation
{
  "date": {
    object (Date)
  },
  "nightlyTemperatureCelsius": number,
  "baselineTemperatureCelsius": number,
  "relativeNightlyStddev30dCelsius": number
}
Fields
date

object (Date)

Required. Date for which the sleep temperature derivations are calculated.

nightlyTemperatureCelsius

number

Required. The user's nightly skin temperature. It is the mean of skin temperature samples taken from the user’s sleep.

baselineTemperatureCelsius

number

Optional. The user's baseline skin temperature. It is the median of the user's nightly skin temperature over the past 30 days.

relativeNightlyStddev30dCelsius

number

Optional. The standard deviation of the user’s relative nightly skin temperature (temperature - baseline) over the past 30 days.

SedentaryPeriod

SedentaryPeriod

SedentaryPeriod data represents the periods of time that the user was sedentary (i.e. not moving while wearing the device).

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  }
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

RunVO2Max

VO2 max value calculated based on the user's running activity. Value stored in ml/kg/min.

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "runVo2Max": number
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time at which the metric was measured.

runVo2Max

number

Required. Run VO2 max value in ml/kg/min.

OxygenSaturation

Captures the user's instantaneous oxygen saturation percentage (SpO2).

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "percentage": number
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time at which oxygen saturation was measured.

percentage

number

Required. The oxygen saturation percentage. Valid values are from 0 to 100.

DailyOxygenSaturation

A daily oxygen saturation (SpO2) record. Represents the user's daily oxygen saturation summary, typically calculated during sleep.

JSON representation
{
  "date": {
    object (Date)
  },
  "averagePercentage": number,
  "lowerBoundPercentage": number,
  "upperBoundPercentage": number,
  "standardDeviationPercentage": number
}
Fields
date

object (Date)

Required. Date (in user's timezone) of the daily oxygen saturation record.

averagePercentage

number

Required. The average value of the oxygen saturation samples during the sleep.

lowerBoundPercentage

number

Required. The lower bound of the confidence interval of oxygen saturation samples during sleep.

upperBoundPercentage

number

Required. The upper bound of the confidence interval of oxygen saturation samples during sleep.

standardDeviationPercentage

number

Optional. Standard deviation of the daily oxygen saturation averages from the past 7-30 days.

ActivityLevel

Internal type to capture activity level during a certain time interval.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "activityLevelType": enum (ActivityLevel.ActivityLevelType)
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

activityLevelType

enum (ActivityLevel.ActivityLevelType)

Required. Activity level type in the given time interval.

ActivityLevel.ActivityLevelType

Represents different activity level types.

Enums
ACTIVITY_LEVEL_TYPE_UNSPECIFIED Unspecified activity level type.
SEDENTARY Sedentary activity level.
LIGHTLY_ACTIVE Lightly active activity level.
MODERATELY_ACTIVE Moderately active activity level.
VERY_ACTIVE Very active activity level.

VO2Max

VO2 max measurement.

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "vo2Max": number,
  "measurementMethod": enum (VO2Max.MeasurementMethod)
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time at which VO2 max was measured.

vo2Max

number

Required. VO2 max value measured as in ml consumed oxygen / kg of body weight / min.

measurementMethod

enum (VO2Max.MeasurementMethod)

Optional. The method used to measure the VO2 max value.

VO2Max.MeasurementMethod

Measurement method used to measure the VO2 max value.

Enums
MEASUREMENT_METHOD_UNSPECIFIED Unspecified measurement method.
FITBIT_RUN Fitbit specific, measures VO2 max rate during a run.
GOOGLE_DEMOGRAPHIC Google specific, measures VO2 max rate for a user based on their demographic data.
COOPER_TEST Run as far as possible for 12 minutes. Distance correlated with age and gender translates to a VO2 max value.
HEART_RATE_RATIO Maximum heart rate divided by the resting heart rate, with a multiplier applied. Does not require any exercise.
METABOLIC_CART Measured by a medical device called metabolic cart.
MULTISTAGE_FITNESS_TEST Continuous 20m back-and-forth runs with increasing difficulty, until exhaustion.
ROCKPORT_FITNESS_TEST Measured using walking exercise.
MAX_EXERCISE Healthkit specific, measures VO2 max rate by monitoring exercise to the user’s physical limit. Similar to COOPER_TEST or MULTISTAGE_FITNESS_TEST.
PREDICTION_SUB_MAX_EXERCISE Healthkit specific, estimates VO2 max rate based on low-intensity exercise. Similar to ROCKPORT_FITNESS_TEST.
PREDICTION_NON_EXERCISE Healthkit specific, estimates VO2 max rate without any exercise. Similar to HEART_RATE_RATIO.
OTHER Use when the method is not covered in this enum.

DailyVO2Max

Contains a daily summary of the user's VO2 max (cardio fitness score), which is the maximum rate of oxygen the body can use during exercise.

JSON representation
{
  "date": {
    object (Date)
  },
  "vo2Max": number,
  "estimated": boolean,
  "cardioFitnessLevel": enum (DailyVO2Max.CardioFitnessLevel),
  "vo2MaxCovariance": number
}
Fields
date

object (Date)

Required. The date for which the Daily VO2 max was measured.

vo2Max

number

Required. Daily VO2 max value measured as in ml consumed oxygen / kg of body weight / min.

estimated

boolean

Optional. An estimated field is added to indicate when the confidence has decreased sufficiently to consider the value an estimation.

cardioFitnessLevel

enum (DailyVO2Max.CardioFitnessLevel)

Optional. Represents the user's cardio fitness level based on their VO2 max.

vo2MaxCovariance

number

Optional. The covariance of the VO2 max value.

DailyVO2Max.CardioFitnessLevel

The cardio fitness level categories.

Enums
CARDIO_FITNESS_LEVEL_UNSPECIFIED Unspecified cardio fitness level.
POOR Poor cardio fitness level.
FAIR Fair cardio fitness level.
AVERAGE Average cardio fitness level.
GOOD Good cardio fitness level.
VERY_GOOD Very good cardio fitness level.
EXCELLENT Excellent cardio fitness level.

DailyHeartRateZones

User's heart rate zone thresholds based on the Karvonen algorithm for a specific day.

JSON representation
{
  "date": {
    object (Date)
  },
  "heartRateZones": [
    {
      object (DailyHeartRateZones.HeartRateZone)
    }
  ]
}
Fields
date

object (Date)

Required. Date (in user's timezone) of the heart rate zones record.

heartRateZones[]

object (DailyHeartRateZones.HeartRateZone)

Required. The heart rate zones.

DailyHeartRateZones.HeartRateZone

The heart rate zone.

JSON representation
{
  "heartRateZoneType": enum (HeartRateZoneType),
  "minBeatsPerMinute": string,
  "maxBeatsPerMinute": string
}
Fields
heartRateZoneType

enum (HeartRateZoneType)

Required. The heart rate zone type.

minBeatsPerMinute

string (int64 format)

Required. Minimum heart rate for this zone in beats per minute.

maxBeatsPerMinute

string (int64 format)

Required. Maximum heart rate for this zone in beats per minute.

HeartRateZoneType

The heart rate zone type.

Enums
HEART_RATE_ZONE_TYPE_UNSPECIFIED Unspecified heart rate zone.
LIGHT The light heart rate zone.
MODERATE The moderate heart rate zone.
VIGOROUS The vigorous heart rate zone.
PEAK The peak heart rate zone.

HydrationLog

Holds information about a user logged hydration.

JSON representation
{
  "interval": {
    object (SessionTimeInterval)
  },
  "amountConsumed": {
    object (VolumeQuantity)
  }
}
Fields
interval

object (SessionTimeInterval)

Required. Observed interval.

amountConsumed

object (VolumeQuantity)

Required. Amount of liquid (ex. water) consumed.

VolumeQuantity

Represents the volume quantity.

JSON representation
{
  "milliliters": number,
  "userProvidedUnit": enum (VolumeUnit)
}
Fields
milliliters

number

Required. Value representing the volume in milliliters.

userProvidedUnit

enum (VolumeUnit)

Optional. Value representing the user provided unit.

VolumeUnit

Enum representing the unit of volume.

Enums
VOLUME_UNIT_UNSPECIFIED Unspecified volume unit.
CUP_IMPERIAL Cup (imperial)
CUP_US Cup (US)
FLUID_OUNCE_IMPERIAL Fluid ounce (imperial)
FLUID_OUNCE_US Fluid ounce (US)
LITER Liter
MILLILITER Milliliter
PINT_IMPERIAL Pint (imperial)
PINT_US Pint (US)

TimeInHeartRateZone

Time in heart rate zone record. It's an interval spent in specific heart rate zone.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "heartRateZoneType": enum (HeartRateZoneType)
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

heartRateZoneType

enum (HeartRateZoneType)

Required. Heart rate zone type.

ActiveMinutes

Record of active minutes in a given time interval.

JSON representation
{
  "interval": {
    object (ObservationTimeInterval)
  },
  "activeMinutesByActivityLevel": [
    {
      object (ActiveMinutes.ActiveMinutesByActivityLevel)
    }
  ]
}
Fields
interval

object (ObservationTimeInterval)

Required. Observed interval.

activeMinutesByActivityLevel[]

object (ActiveMinutes.ActiveMinutesByActivityLevel)

Required. Active minutes by activity level. At most one record per activity level is allowed.

ActiveMinutes.ActiveMinutesByActivityLevel

Active minutes at a given activity level.

JSON representation
{
  "activityLevel": enum (ActiveMinutes.ActivityLevel),
  "activeMinutes": string
}
Fields
activityLevel

enum (ActiveMinutes.ActivityLevel)

Required. The level of activity.

activeMinutes

string (int64 format)

Required. Number of whole minutes spent in activity.

ActiveMinutes.ActivityLevel

Activity level.

Enums
ACTIVITY_LEVEL_UNSPECIFIED Activity level is unspecified.
LIGHT Light activity level.
MODERATE Moderate activity level.
VIGOROUS Vigorous activity level.

RespiratoryRateSleepSummary

Records respiratory rate details during sleep. Can have multiple per day if the user sleeps multiple times.

JSON representation
{
  "sampleTime": {
    object (ObservationSampleTime)
  },
  "deepSleepStats": {
    object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)
  },
  "lightSleepStats": {
    object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)
  },
  "remSleepStats": {
    object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)
  },
  "fullSleepStats": {
    object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)
  }
}
Fields
sampleTime

object (ObservationSampleTime)

Required. The time at which respiratory rate was measured.

deepSleepStats

object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)

Optional. Respiratory rate statistics for deep sleep.

lightSleepStats

object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)

Optional. Respiratory rate statistics for light sleep.

remSleepStats

object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)

Optional. Respiratory rate statistics for REM sleep.

fullSleepStats

object (RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics)

Required. Full respiratory rate statistics.

RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics

Respiratory rate statistics for a given sleep stage.

JSON representation
{
  "breathsPerMinute": number,
  "standardDeviation": number,
  "signalToNoise": number
}
Fields
breathsPerMinute

number

Required. Average breaths per minute.

standardDeviation

number

Optional. Standard deviation of the respiratory rate during sleep.

signalToNoise

number

Optional. How trustworthy the data is for the computation.

DailyRespiratoryRate

A daily average respiratory rate (breaths per minute) for a day of the year. One data point per day calculated for the main sleep.

JSON representation
{
  "date": {
    object (Date)
  },
  "breathsPerMinute": number
}
Fields
date

object (Date)

Required. The date on which the respiratory rate was measured.

breathsPerMinute

number

Required. The average number of breaths taken per minute.

DataSource

Data Source definition to track the origin of data.

Each health data point, regardless of the complexity or data model (whether a simple step count or a detailed sleep session) must retain information about its source of origin (e.g. the device or app that collected it).

JSON representation
{
  "recordingMethod": enum (DataSource.RecordingMethod),
  "device": {
    object (DataSource.Device)
  },
  "application": {
    object (DataSource.Application)
  },
  "platform": enum (DataSource.Platform)
}
Fields
recordingMethod

enum (DataSource.RecordingMethod)

Optional. Captures how the data was recorded.

device

object (DataSource.Device)

Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.

application

object (DataSource.Application)

Output only. Captures metadata for the application that provided this data.

platform

enum (DataSource.Platform)

Output only. Captures the platform that uploaded the data.

DataSource.RecordingMethod

The method by which the data was recorded.

Enums
RECORDING_METHOD_UNSPECIFIED The recording method is unspecified.
MANUAL The data was manually entered by the user.
PASSIVELY_MEASURED The data was passively measured by a device.
DERIVED The data was derived from other data, e.g., by an algorithm in the backend.
ACTIVELY_MEASURED The data was actively measured by a device.
UNKNOWN The recording method is unknown. This is set when the data is uploaded from a third party app that does not provide this information.

DataSource.Device

Captures metadata about the device that recorded the measurement.

JSON representation
{
  "formFactor": enum (DataSource.Device.FormFactor),
  "manufacturer": string,
  "displayName": string
}
Fields
formFactor

enum (DataSource.Device.FormFactor)

Optional. Captures the form factor of the device.

manufacturer

string

Optional. An optional manufacturer of the device.

displayName

string

Optional. An optional name for the device.

DataSource.Device.FormFactor

Form factor of the device, e.g. phone, watch, band, etc.

Enums
FORM_FACTOR_UNSPECIFIED The form factor is unspecified.
FITNESS_BAND The device is a fitness band.
WATCH The device is a watch.
PHONE The device is a phone.
RING The device is a ring.
CHEST_STRAP The device is a chest strap.
SCALE The device is a scale.
TABLET The device is a tablet.
HEAD_MOUNTED The device is a head mounted device.
SMART_DISPLAY The device is a smart display.

DataSource.Application

Optional metadata for the application that provided this data.

JSON representation
{
  "packageName": string,
  "webClientId": string,
  "googleWebClientId": string
}
Fields
packageName

string

Output only. A unique ID from an external data source.

A unique identifier of the mobile application, e.g. com.google.fitbit

webClientId

string

Output only. Captures the client ID of the web application that recorded the data.

googleWebClientId

string

Output only. Captures the client ID of the entity that recorded the data.

DataSource.Platform

The platform that uploaded the data. Additional values may be added in the future. Clients should be prepared to handle unknown values gracefully.

Enums
PLATFORM_UNSPECIFIED The platform is unspecified.
FITBIT The data was uploaded from Fitbit.
HEALTH_CONNECT The data was uploaded from Health Connect.
HEALTH_KIT The data was uploaded from Health Kit.
FIT The data was uploaded from Google Fit.
FITBIT_WEB_API The data was uploaded from Fitbit legacy Web API.
NEST The data was uploaded from Nest devices.
GOOGLE_WEB_API The data was uploaded from Google Health API.
GOOGLE_PARTNER_INTEGRATION The data was uploaded from Google Partner Integrations.

Methods

batchDelete

Delete a batch of identifyable data points.

create

Creates a single identifiable data point.

dailyRollUp

Roll up data points over civil time intervals for supported data types.

exportExerciseTcx

Exports exercise data in TCX format.

list

Query user health and fitness data points.

patch

Updates a single identifiable data point.

reconcile

Reconcile data points from multiple data sources into a single data stream.

rollUp

Roll up data points over physical time intervals for supported data types.