Skip to content
AF
Google Health API reference

Hydration Log: the Google Health API hydration-log data type

Read from Google’s documentation on 2026-10-17 · discovery document revision 20261014 · Google’s data-types page last updated 2026-10-06

Hydration Log (hydration-log) is a Session data type in the Google Health API. Google's data-types table lists list, get, reconcile, rollup, dailyRollup, create, update and batchDelete for it under the .nutrition.readonly and .nutrition.writeonly scopes. The table marks it with webhook support. Google's Fitbit migration table names no Fitbit Web API predecessor for it.

Hydration Log at a glance

From the Hydration Log row of Google’s data-types table, joined to the discovery document’s DataPoint schema.

Display name
Hydration Log
dataType (in endpoint URLs)
hydration-log
filter parameter
hydration_logGoogle: “The identifier separated by underscores (for example, active_minutes) used as the value for the dataType filter parameter in daily rollup and rollup requests.”
Record type
Session — Google: “Represents a continuous block of recording, such as a workout or an electrocardiogram (ECG) session.”
Storage resolution
not stated in Google’s table
Webhook support
Yes · automatic-subscription token WEBHOOK_DATA_TYPE_HYDRATION_LOG
True zeros support
Not marked in Google’s table
Channel
v4
DataPoint field
DataPoint.hydrationLog → HydrationLogIts description: “Optional. Data for points in the hydration-log session data type collection.”
Compatible devices
0 in Google’s table

Operations and request paths

The operations Google’s table lists for hydration-log, each matched to its users.dataTypes.dataPoints method in the discovery document. The path is the documented path template (the method’s flatPath on https://health.googleapis.com/) with {dataTypesId} filled in as hydration-log. Google on {user}: “The {user} can be either the alias me or the authenticated user's numeric Health User ID (retrieved via GetIdentity).”

Table listsMethodDocumented path template
listlistGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints
getgetGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints/{dataPointsId}
reconcilereconcileGET https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:reconcile
rolluprollUpsame name, different casePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:rollUp
dailyRollupdailyRollUpsame name, different casePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:dailyRollUp
createcreatePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints
updatepatchvia Google’s endpoint-mapping table (flagged below)PATCH https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints/{dataPointsId}
batchDeletebatchDeletePOST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:batchDelete

Every method, and how many of the data types list it: the methods overview.

Scopes

The scopes Google’s table lists for hydration-log, as full URLs, with the consent text Google’s Scopes page gives each. Every Google Health API scope.

ScopeAccessGoogle’s permission text
https://www.googleapis.com/auth/googlehealth.nutrition.readonlynot in the v4 discovery documentreadSee your Google Health nutrition data.
https://www.googleapis.com/auth/googlehealth.nutrition.writeonlywriteAdd nutrition data to Google Health, and edit or delete the data it adds.

Fields of Hydration Log

The schema the discovery document gives DataPoint.hydrationLog, required fields first. Types are as the discovery document states them; the label is the word Google’s description opens with. The schemas its fields refer to follow, one level deep.

HydrationLog — Google: “Holds information about a user logged hydration.”

FieldTypeGoogle’s description
amountConsumedRequiredVolumeQuantityRequired. Amount of liquid (ex. water) consumed.
intervalRequiredSessionTimeIntervalRequired. Observed interval.

VolumeQuantity

Google: “Represents the volume quantity.”

FieldTypeGoogle’s description
millilitersRequirednumber/doubleRequired. Value representing the volume in milliliters. Must be in the range [0, 100000].
userProvidedUnitOptionalstringOptional. Value representing the user provided unit, used only for user-facing input and display purposes. In the API format, all volume quantities are converted to milliliters.
  • 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)

SessionTimeInterval

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

FieldTypeGoogle’s description
endTimeRequiredstring/google-datetimeRequired. The end time of the observed session.
endUtcOffsetRequiredstring/google-durationRequired. The offset of the user's local time at the end of the session relative to the Coordinated Universal Time (UTC).
startTimeRequiredstring/google-datetimeRequired. The start time of the observed session.
startUtcOffsetRequiredstring/google-durationRequired. The offset of the user's local time at the start of the session relative to the Coordinated Universal Time (UTC).
civilEndTimeOutput onlyCivilDateTimeOutput only. Session end time in civil time in the timezone the subject is in at the end of the session.
civilStartTimeOutput onlyCivilDateTimeOutput only. Session start time in civil time in the timezone the subject is in at the start of the session.

Rollup fields

rollUp returns RollupDataPoint.hydrationLog

The discovery document: “Returned by default when rolling up data points from the hydration-log data type, or when requested explicitly using the hydration-log rollup type identifier.”

HydrationLogRollupValue — Google: “Represents the result of the rollup of the hydration log data type.”

FieldTypeGoogle’s description
amountConsumedVolumeQuantityRollupRollup for amount consumed.

VolumeQuantityRollup

Google: “Rollup for volume quantity.”

FieldTypeGoogle’s description
millilitersSumRequirednumber/doubleRequired. The sum of volume in milliliters.
userProvidedUnitLastOptionalstringOptional. The user provided unit on the last element.
  • 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)

dailyRollUp returns DailyRollupDataPoint.hydrationLog

The discovery document: “Returned by default when rolling up data points from the hydration-log data type, or when requested explicitly using the hydration-log rollup type identifier.”

The same HydrationLogRollupValue as the rollUp result above.

Fitbit Web API predecessor

Google’s Fitbit Web API → Google Health API data-type table has no row for hydration-log, so it names no Fitbit Web API predecessor.

Fitbit Web API scopes Google maps to hydration-log’s scopes: nutrition.

Google’s full Fitbit Web API mapping tables · the migration playbook

Where Google’s pages disagree

Published as found, with the texts that disagree; nothing here is corrected by us.

  • Operation name differs

    The table lists "update" for hydration-log, but the discovery document has no method named update; Google's endpoint-mapping table points updates at patch.

    • Google's Fitbit migration API specifications: “CREATE & UPDATE Logs”
    • Google's Fitbit migration API specifications: “patch method”
    • the v4 discovery document: “Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.”
  • Scope missing from the discovery document

    The table lists .nutrition.readonly for hydration-log, but the v4 discovery document defines no https://www.googleapis.com/auth/googlehealth.nutrition.readonly scope, and none of its methods accepts it.

    • Google's data-types page: “.nutrition.readonly”
    • Google's Scopes page: “See your Google Health nutrition data.”

Google’s documentation

Related on this site

Questions

Which OAuth scopes does the Google Health API hydration-log data type need?

Google's data-types table (read 2026-10-17) lists https://www.googleapis.com/auth/googlehealth.nutrition.readonly and https://www.googleapis.com/auth/googlehealth.nutrition.writeonly for hydration-log. The Scopes page's consent text: .nutrition.readonly, "See your Google Health nutrition data."; .nutrition.writeonly, "Add nutrition data to Google Health, and edit or delete the data it adds." Note that https://www.googleapis.com/auth/googlehealth.nutrition.readonly is not defined in the v4 discovery document, and none of its methods lists it among accepted scopes.

Can apps write hydration log data to the Google Health API?

Yes. Google's data-types table lists create, update and batchDelete for hydration-log. create is POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints. The table's "update" has no method of that name in the discovery document; Google's endpoint-mapping table points updates at patch, which is PATCH https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints/{dataPointsId}. batchDelete is POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:batchDelete. Writes need https://www.googleapis.com/auth/googlehealth.nutrition.writeonly.

How do you aggregate hydration-log data with the Google Health API?

With the rollup methods Google's table lists for it. rollUp (POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:rollUp) returns RollupDataPoint.hydrationLog, a HydrationLogRollupValue with amountConsumed; dailyRollUp (POST https://health.googleapis.com/v4/users/{usersId}/dataTypes/hydration-log/dataPoints:dailyRollUp) returns DailyRollupDataPoint.hydrationLog, a HydrationLogRollupValue with amountConsumed. Each field is described on this page as the discovery document describes it.

Does the Google Health API send webhooks for hydration-log?

Yes. Google's data-types table marks hydration-log with webhook support, the webhooks guide lists it, and automatic subscriptions name it with the token WEBHOOK_DATA_TYPE_HYDRATION_LOG.

Other nutrition data types

All nutrition data types →

Sources checked

Google’s text is quoted for identification; each guide page’s footer reads: “Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.”. Generated from Google’s pages by scripts/fetch-google-health-api.mjs, not typed by hand; Google’s documentation remains the authority.

← All Google Health API data types