Service Client: Google::Devicesandservices::Health::V4::DataPoints::DataPointsServiceClient

Client stub representing the remote DataPointsService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to devicesandservices.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Devicesandservices::Health::V4::DataPoints - Compiled Protocol Buffers messages for google/devicesandservices/health/v4/data_points.proto

SYNOPSIS

use Google::Devicesandservices::Health::V4::DataPoints;

my $msg = Google::Devicesandservices::Health::V4::DataPoints::DataPoint->new({
    steps => $steps,
    floors => $floors,
    heart_rate => $heart_rate,
    sleep => $sleep,
});

# Read or update a field
my $val = $msg->steps();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Devicesandservices::Health::V4::DataPoints::DataPoint->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/devicesandservices/health/v4/data_points.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Devicesandservices::Health::V4::DataPoints::DataPoint

A computed or recorded metric.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::ReconciledDataPoint

A reconciled computed or recorded metric.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::RollupDataPoint

Value of a rollup for a single physical time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::DailyRollupDataPoint

Value of a daily rollup for a single civil time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::GetDataPointRequest

Request for getting a single data point

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the data point to retrieve.

    Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`

    See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

Google::Devicesandservices::Health::V4::DataPoints::ListDataPointsRequest

Request for listing raw data points

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Parent data type of the Data Point collection.

    Format: `users/me/dataTypes/{data_type}`, e.g.:

    - `users/me/dataTypes/steps` - `users/me/dataTypes/weight`

    For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For `exercise` and `sleep` the default page size is 25. The maximum page size for `exercise` and `sleep` is 25.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The `next_page_token` from a previous request, if any.

  • $msg->filter() / $msg->filter($value)

    Type: String

    Optional. Filter expression following https://google.aip.dev/160.

    A time range (either physical or civil) can be specified.

    The supported filter fields are:

    - Interval start time: - Pattern: `{interval_data_type}.interval.start_time` - Supported comparison operators: `>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"` - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`

    - Interval civil start time: - Pattern: `{interval_data_type}.interval.civil_start_time` - Supported comparison operators: `>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `steps.interval.civil_start_time >= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"` - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`

    - Sample observation physical time: - Pattern: `{sample_data_type}.sample_time.physical_time` - Supported comparison operators: `>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND` - Example: - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` - `weight.sample_time.physical_time >= "2024-08-14T12:34:56Z"`

    - Sample observation civil time: - Pattern: `{sample_data_type}.sample_time.civil_time` - Supported comparison operators: `>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `weight.sample_time.civil_time >= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"` - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`

    - Daily summary date: - Pattern: `{daily_summary_data_type}.date` - Supported comparison operators: `>=`, `<` - Date literal expected in ISO 8601 `YYYY-MM-DD` format - Supported logical operators: `AND` - Example: - `daily_heart_rate_variability.date < "2024-08-15"`

    - Session civil start time (Excluding Sleep and ECG): - Pattern: `{session_data_type}.interval.civil_start_time` - Supported comparison operators: `>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND` - Example: - `exercise.interval.civil_start_time >= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"` - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`

    - Session start time (ECG specific): - Pattern: `electrocardiogram.interval.start_time` - Supported comparison operators: `>=` - Timestamp literal expected in RFC-3339 format - Example: - `electrocardiogram.interval.start_time >= "2024-08-14T12:34:56Z"` - Note: Only filtering by start time is supported for ECG. Filtering by end time (e.g., `electrocardiogram.interval.end_time`) is not supported.

    - Session end time (Sleep specific): - Pattern: `sleep.interval.end_time` - Supported comparison operators: `>=`, `<` - Timestamp literal expected in RFC-3339 format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"`

    - Session civil end time (Sleep specific): - Pattern: `sleep.interval.civil_end_time` - Supported comparison operators: `>=`, `<` - Date with optional time literal expected in ISO 8601 `YYYY-MM-DD[THH:mm:ss]` format - Supported logical operators: `AND`, `OR` - Example: - `sleep.interval.civil_end_time >= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"`

    Data points in the response will be ordered by the interval start time in descending order.

Google::Devicesandservices::Health::V4::DataPoints::ListDataPointsResponse

Response containing raw data points matching the query

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::CreateDataPointRequest

Request to create an identifiable data point.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The parent resource name where the data point will be created. Format: `users/{user}/dataTypes/{data_type}`

  • $msg->data_point() / $msg->data_point($value)

    Type: Message (Google::Devicesandservices::Health::V4::DataPoints::DataPoint)

    Required. The data point to create.

Google::Devicesandservices::Health::V4::DataPoints::CreateDataPointOperationMetadata

Metadata for a create data point operation.

Inherits from Protobuf::Message.

Google::Devicesandservices::Health::V4::DataPoints::UpdateDataPointRequest

Request to update an identifiable data point.

Inherits from Protobuf::Message.

Accessors

  • $msg->data_point() / $msg->data_point($value)

    Type: Message (Google::Devicesandservices::Health::V4::DataPoints::DataPoint)

    Required. The data point to update

    The data point's `name` field is used to identify the data point to update.

    Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`

Google::Devicesandservices::Health::V4::DataPoints::UpdateDataPointOperationMetadata

Metadata for an update data point operation.

Inherits from Protobuf::Message.

Google::Devicesandservices::Health::V4::DataPoints::BatchDeleteDataPointsRequest

Request to delete a batch of identifiable data points.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Optional. Parent (data type) for the Data Point collection Format: `users/me/dataTypes/{data_type}`, e.g.:

    - `users/me/dataTypes/steps` - `users/me/dataTypes/-`

    For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

    Deleting data points across multiple data type collections is supported following https://aip.dev/159.

    If this is set, the parent of all of the data points specified in `names` must match this field.

  • $msg->names() / $msg->names($value)

    Type: String

    Required. The names of the DataPoints to delete. A maximum of 10000 data points can be deleted in a single request.

Google::Devicesandservices::Health::V4::DataPoints::BatchDeleteDataPointsResponse

Response containing the list of possibly soft-deleted DataPoints.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::BatchDeleteDataPointsOperationMetadata

Metadata for a batch delete data points operation.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::ReconcileDataPointsRequest

Request to reconcile data points from multiple data sources.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Parent data type of the Data Point collection.

    Format: `users/me/dataTypes/{data_type}`, e.g.:

    - `users/me/dataTypes/steps` - `users/me/dataTypes/heart-rate`

    For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For `exercise` and `sleep` the default page size is 25. The maximum page size for `exercise` and `sleep` is 25.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The `next_page_token` from a previous request, if any.

  • $msg->filter() / $msg->filter($value)

    Type: String

    Optional. Filter expression based on https://aip.dev/160.

    A time range, either physical or civil, can be specified. See the [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter] for the supported fields and syntax.

  • $msg->data_source_family() / $msg->data_source_family($value)

    Type: String

    Optional. The data source family name to reconcile.

    If empty, data points from all data sources will be reconciled.

    Format: `users/me/dataSourceFamilies/{data_source_family}`

    - `users/me/dataSourceFamilies/all-sources` - Default value. Includes data from all available data sources. - `users/me/dataSourceFamilies/google-wearables` - Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data. - `users/me/dataSourceFamilies/google-sources` - Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect. - `users/me/dataSourceFamilies/self-sources` - Includes only the data the calling client wrote through this API, that is, data points whose data source was registered through this API with the same OAuth client ID as the caller.

    Callers that were only granted write scopes for the requested data type may only read the data they wrote themselves: their requests are implicitly restricted to `self-sources`, and requesting any other data source family fails with `PERMISSION_DENIED`.

    If no data point matches the requested data source family, the response is an empty list rather than an error.

Google::Devicesandservices::Health::V4::DataPoints::ReconcileDataPointsResponse

Response containing the list of reconciled DataPoints.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::RollUpDataPointsRequest

Request to roll up data points by physical time intervals.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Parent data type of the Data Point collection.

    Format: `users/{user}/dataTypes/{data_type}`, e.g.:

    - `users/me/dataTypes/steps` - `users/me/dataTypes/distance`

    For a list of the supported data types see the [RollupDataPoint value][google.devicesandservices.health.v4.RollupDataPoint] union field.

  • $msg->range() / $msg->range($value)

    Type: Message (Google::Type::Interval::Interval)

    Required. Closed-open range of data points that will be rolled up. The maximum range for `calories-in-heart-rate-zone`, `heart-rate`, `active-minutes` and `total-calories` is 14 days. The maximum range for all other data types is 90 days.

  • $msg->window_size() / $msg->window_size($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Required. The size of the time window to group data points into before applying the aggregation functions. Must be at least 1 second.

    If the requested range is not an exact multiple of `window_size`, the final bucket chronologically will be truncated at the upper endpoint of the range and will cover a duration shorter than `window_size`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The next_page_token from a previous request, if any. All other request fields need to be the same as in the initial request when the page token is specified.

  • $msg->data_source_family() / $msg->data_source_family($value)

    Type: String

    Optional. The data source family name to roll up.

    If empty, data points from all available data sources will be rolled up.

    Format: `users/me/dataSourceFamilies/{data_source_family}`

    The supported values are:

    - `users/me/dataSourceFamilies/all-sources` - Default value. Includes data from all available data sources. - `users/me/dataSourceFamilies/google-wearables` - Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data. - `users/me/dataSourceFamilies/google-sources` - Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect. - `users/me/dataSourceFamilies/self-sources` - Includes only the data the calling client wrote through this API, that is, data points whose data source was registered through this API with the same OAuth client ID as the caller.

    Callers that were only granted write scopes for the requested data type may only read the data they wrote themselves: their requests are implicitly restricted to `self-sources`, and requesting any other data source family fails with `PERMISSION_DENIED`.

    If no data point matches the requested data source family, the response is an empty list rather than an error.

Google::Devicesandservices::Health::V4::DataPoints::RollUpDataPointsResponse

Response containing the list of rolled up data points.

Inherits from Protobuf::Message.

Accessors

  • $msg->rollup_data_points() / $msg->rollup_data_points($value)

    Type: Message (Google::Devicesandservices::Health::V4::DataPoints::RollupDataPoint)

    Values for each aggregation time window.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.

Google::Devicesandservices::Health::V4::DataPoints::DailyRollUpDataPointsRequest

Request to roll up data points by civil time intervals.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Parent data type of the Data Point collection.

    Format: `users/{user}/dataTypes/{data_type}`, e.g.:

    - `users/me/dataTypes/steps` - `users/me/dataTypes/distance`

    For a list of the supported data types see the [DailyRollupDataPoint value][google.devicesandservices.health.v4.DailyRollupDataPoint] union field.

  • $msg->range() / $msg->range($value)

    Type: Message (Google::Devicesandservices::Health::V4::DataCoordinates::CivilTimeInterval)

    Required. Closed-open range of data points that will be rolled up. The start time must be aligned with the aggregation window. The maximum range for `calories-in-heart-rate-zone`, `heart-rate`, `active-minutes` and `total-calories` is 14 days. The maximum range for all other data types is 90 days.

  • $msg->window_size_days() / $msg->window_size_days($value)

    Type: Int32

    Optional. Aggregation window size, in number of days. Defaults to 1 if not specified.

    If the requested range is not an exact multiple of `window_size_days`, the final bucket chronologically will be truncated at the upper endpoint of the range and will cover a duration shorter than `window_size_days`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The `next_page_token` from a previous request, if any. All other request fields need to be the same as in the initial request when the page token is specified.

  • $msg->data_source_family() / $msg->data_source_family($value)

    Type: String

    Optional. The data source family name to roll up. If empty, data points from all available data sources will be rolled up.

    Format: `users/me/dataSourceFamilies/{data_source_family}`

    The supported values are:

    - `users/me/dataSourceFamilies/all-sources` - Default value. Includes data from all available data sources. - `users/me/dataSourceFamilies/google-wearables` - Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data. - `users/me/dataSourceFamilies/google-sources` - Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect. - `users/me/dataSourceFamilies/self-sources` - Includes only the data the calling client wrote through this API, that is, data points whose data source was registered through this API with the same OAuth client ID as the caller.

    Callers that were only granted write scopes for the requested data type may only read the data they wrote themselves: their requests are implicitly restricted to `self-sources`, and requesting any other data source family fails with `PERMISSION_DENIED`.

    If no data point matches the requested data source family, the response is an empty list rather than an error.

Google::Devicesandservices::Health::V4::DataPoints::DailyRollUpDataPointsResponse

Response containing the list of rolled up data points.

Inherits from Protobuf::Message.

Accessors

Google::Devicesandservices::Health::V4::DataPoints::DataType

Represents a type of health data a user can have data points recorded for. It matches the parent resource of collection containing data points of the given type.

Clients currently do not need to interact with this resource directly.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Identifier. The resource name of the data type.

    Format: `users/{user}/dataTypes/{data_type}`

    See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

Google::Devicesandservices::Health::V4::DataPoints::ExportExerciseTcxRequest

Represents a request to export exercise data in TCX format.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the exercise data point to export.

    Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}` Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`

    The `{user}` is the alias `"me"` currently. Future versions may support user IDs. The `{data_point}` ID maps to the exercise ID, which is a long integer.

  • $msg->partial_data() / $msg->partial_data($value)

    Type: Bool

    Optional. Indicates whether to include the TCX data points when the GPS data is not available. If not specified, defaults to `false` and partial data will not be included.

Google::Devicesandservices::Health::V4::DataPoints::ExportExerciseTcxResponse

Represents a Response for exporting exercise data in TCX format.

Inherits from Protobuf::Message.

Accessors

  • $msg->tcx_data() / $msg->tcx_data($value)

    Type: String

    Contains the exported TCX data.

    This field is intended for gRPC clients, as media download integration is not supported for gRPC. HTTP clients should instead use the `alt=media` query parameter to download the raw binary TCX file.

SEE ALSO

Protobuf, Protobuf::Message, Google::Devicesandservices::Health::V4::DataPoints::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.