public static final class ListDataPointsRequest.Builder extends GeneratedMessage.Builder<ListDataPointsRequest.Builder> implements ListDataPointsRequestOrBuilderRequest for listing raw data points
Protobuf type google.devicesandservices.health.v4beta.ListDataPointsRequest
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ListDataPointsRequest.BuilderImplements
ListDataPointsRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ListDataPointsRequest build()| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest |
|
buildPartial()
public ListDataPointsRequest buildPartial()| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest |
|
clear()
public ListDataPointsRequest.Builder clear()| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
|
clearDataSourceFamily()
public ListDataPointsRequest.Builder clearDataSourceFamily()Optional. The data source family name to filter by.
If empty, data points from all available data sources will be returned.
Format: users/{user}/dataSourceFamilies/{data_source_family}
The {user} can be either the alias me or the authenticated user's
numeric Health User ID, retrieved via
GetIdentity
(e.g. users/me/dataSourceFamilies/... or
users/1234567890/dataSourceFamilies/...).
The supported values are:
users/{user}/dataSourceFamilies/all-sources- Default value. Includes data from all available data sources.users/{user}/dataSourceFamilies/google-wearables- Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.users/{user}/dataSourceFamilies/google-sources- Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.users/{user}/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 types may only read the data they wrote themselves: their requests are implicitly restricted to
self-sources, and requesting any other data source family fails withPERMISSION_DENIED.If no data point matches the requested data source family, the response is an empty list rather than an error.
Filtering by data source family is not supported for the
sleep,foodandfood-measurement-unitdata types, because the underlying listing implementation cannot restrict results by data source. Such requests fail withINVALID_ARGUMENTwhen the data source family is set explicitly, and withPERMISSION_DENIEDwhen the restriction is only implied by the caller's scopes. Forsleep, use ReconcileDataPoints instead.
string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
clearFilter()
public ListDataPointsRequest.Builder clearFilter()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-DDformat - 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.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
clearPageSize()
public ListDataPointsRequest.Builder clearPageSize() 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.
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
clearPageToken()
public ListDataPointsRequest.Builder clearPageToken() Optional. The next_page_token from a previous request, if any.
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
clearParent()
public ListDataPointsRequest.Builder clearParent()Required. Parent data type of the Data Point collection.
Format: users/{user}/dataTypes/{data_type}, e.g.:
users/me/dataTypes/stepsusers/1234567890/dataTypes/stepsusers/me/dataTypes/weightusers/1234567890/dataTypes/weightThe
{user}can be either the aliasmeor the authenticated user's numeric Health User ID (retrieved via GetIdentity).For a list of the supported data types see the DataPoint data union field.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
getDataSourceFamily()
public String getDataSourceFamily()Optional. The data source family name to filter by.
If empty, data points from all available data sources will be returned.
Format: users/{user}/dataSourceFamilies/{data_source_family}
The {user} can be either the alias me or the authenticated user's
numeric Health User ID, retrieved via
GetIdentity
(e.g. users/me/dataSourceFamilies/... or
users/1234567890/dataSourceFamilies/...).
The supported values are:
users/{user}/dataSourceFamilies/all-sources- Default value. Includes data from all available data sources.users/{user}/dataSourceFamilies/google-wearables- Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.users/{user}/dataSourceFamilies/google-sources- Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.users/{user}/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 types may only read the data they wrote themselves: their requests are implicitly restricted to
self-sources, and requesting any other data source family fails withPERMISSION_DENIED.If no data point matches the requested data source family, the response is an empty list rather than an error.
Filtering by data source family is not supported for the
sleep,foodandfood-measurement-unitdata types, because the underlying listing implementation cannot restrict results by data source. Such requests fail withINVALID_ARGUMENTwhen the data source family is set explicitly, and withPERMISSION_DENIEDwhen the restriction is only implied by the caller's scopes. Forsleep, use ReconcileDataPoints instead.
string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The dataSourceFamily. |
getDataSourceFamilyBytes()
public ByteString getDataSourceFamilyBytes()Optional. The data source family name to filter by.
If empty, data points from all available data sources will be returned.
Format: users/{user}/dataSourceFamilies/{data_source_family}
The {user} can be either the alias me or the authenticated user's
numeric Health User ID, retrieved via
GetIdentity
(e.g. users/me/dataSourceFamilies/... or
users/1234567890/dataSourceFamilies/...).
The supported values are:
users/{user}/dataSourceFamilies/all-sources- Default value. Includes data from all available data sources.users/{user}/dataSourceFamilies/google-wearables- Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.users/{user}/dataSourceFamilies/google-sources- Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.users/{user}/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 types may only read the data they wrote themselves: their requests are implicitly restricted to
self-sources, and requesting any other data source family fails withPERMISSION_DENIED.If no data point matches the requested data source family, the response is an empty list rather than an error.
Filtering by data source family is not supported for the
sleep,foodandfood-measurement-unitdata types, because the underlying listing implementation cannot restrict results by data source. Such requests fail withINVALID_ARGUMENTwhen the data source family is set explicitly, and withPERMISSION_DENIEDwhen the restriction is only implied by the caller's scopes. Forsleep, use ReconcileDataPoints instead.
string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for dataSourceFamily. |
getDefaultInstanceForType()
public ListDataPointsRequest getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFilter()
public String getFilter()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-DDformat - 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.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The filter. |
getFilterBytes()
public ByteString getFilterBytes()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-DDformat - 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.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for filter. |
getPageSize()
public int getPageSize() 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.
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The pageSize. |
getPageToken()
public String getPageToken() Optional. The next_page_token from a previous request, if any.
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The pageToken. |
getPageTokenBytes()
public ByteString getPageTokenBytes() Optional. The next_page_token from a previous request, if any.
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for pageToken. |
getParent()
public String getParent()Required. Parent data type of the Data Point collection.
Format: users/{user}/dataTypes/{data_type}, e.g.:
users/me/dataTypes/stepsusers/1234567890/dataTypes/stepsusers/me/dataTypes/weightusers/1234567890/dataTypes/weightThe
{user}can be either the aliasmeor the authenticated user's numeric Health User ID (retrieved via GetIdentity).For a list of the supported data types see the DataPoint data union field.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The parent. |
getParentBytes()
public ByteString getParentBytes()Required. Parent data type of the Data Point collection.
Format: users/{user}/dataTypes/{data_type}, e.g.:
users/me/dataTypes/stepsusers/1234567890/dataTypes/stepsusers/me/dataTypes/weightusers/1234567890/dataTypes/weightThe
{user}can be either the aliasmeor the authenticated user's numeric Health User ID (retrieved via GetIdentity).For a list of the supported data types see the DataPoint data union field.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for parent. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ListDataPointsRequest other)
public ListDataPointsRequest.Builder mergeFrom(ListDataPointsRequest other)| Parameter | |
|---|---|
| Name | Description |
other |
ListDataPointsRequest |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ListDataPointsRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ListDataPointsRequest.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
|
setDataSourceFamily(String value)
public ListDataPointsRequest.Builder setDataSourceFamily(String value)Optional. The data source family name to filter by.
If empty, data points from all available data sources will be returned.
Format: users/{user}/dataSourceFamilies/{data_source_family}
The {user} can be either the alias me or the authenticated user's
numeric Health User ID, retrieved via
GetIdentity
(e.g. users/me/dataSourceFamilies/... or
users/1234567890/dataSourceFamilies/...).
The supported values are:
users/{user}/dataSourceFamilies/all-sources- Default value. Includes data from all available data sources.users/{user}/dataSourceFamilies/google-wearables- Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.users/{user}/dataSourceFamilies/google-sources- Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.users/{user}/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 types may only read the data they wrote themselves: their requests are implicitly restricted to
self-sources, and requesting any other data source family fails withPERMISSION_DENIED.If no data point matches the requested data source family, the response is an empty list rather than an error.
Filtering by data source family is not supported for the
sleep,foodandfood-measurement-unitdata types, because the underlying listing implementation cannot restrict results by data source. Such requests fail withINVALID_ARGUMENTwhen the data source family is set explicitly, and withPERMISSION_DENIEDwhen the restriction is only implied by the caller's scopes. Forsleep, use ReconcileDataPoints instead.
string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe dataSourceFamily to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setDataSourceFamilyBytes(ByteString value)
public ListDataPointsRequest.Builder setDataSourceFamilyBytes(ByteString value)Optional. The data source family name to filter by.
If empty, data points from all available data sources will be returned.
Format: users/{user}/dataSourceFamilies/{data_source_family}
The {user} can be either the alias me or the authenticated user's
numeric Health User ID, retrieved via
GetIdentity
(e.g. users/me/dataSourceFamilies/... or
users/1234567890/dataSourceFamilies/...).
The supported values are:
users/{user}/dataSourceFamilies/all-sources- Default value. Includes data from all available data sources.users/{user}/dataSourceFamilies/google-wearables- Includes data from Google and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch). Excludes manually logged data.users/{user}/dataSourceFamilies/google-sources- Includes first-party Google data, such as data from tracker devices, manually logged data, and Health Connect.users/{user}/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 types may only read the data they wrote themselves: their requests are implicitly restricted to
self-sources, and requesting any other data source family fails withPERMISSION_DENIED.If no data point matches the requested data source family, the response is an empty list rather than an error.
Filtering by data source family is not supported for the
sleep,foodandfood-measurement-unitdata types, because the underlying listing implementation cannot restrict results by data source. Such requests fail withINVALID_ARGUMENTwhen the data source family is set explicitly, and withPERMISSION_DENIEDwhen the restriction is only implied by the caller's scopes. Forsleep, use ReconcileDataPoints instead.
string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for dataSourceFamily to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setFilter(String value)
public ListDataPointsRequest.Builder setFilter(String value)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-DDformat - 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.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe filter to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setFilterBytes(ByteString value)
public ListDataPointsRequest.Builder setFilterBytes(ByteString value)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-DDformat - 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.
string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for filter to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setPageSize(int value)
public ListDataPointsRequest.Builder setPageSize(int value) 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.
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe pageSize to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setPageToken(String value)
public ListDataPointsRequest.Builder setPageToken(String value) Optional. The next_page_token from a previous request, if any.
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe pageToken to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setPageTokenBytes(ByteString value)
public ListDataPointsRequest.Builder setPageTokenBytes(ByteString value) Optional. The next_page_token from a previous request, if any.
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for pageToken to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setParent(String value)
public ListDataPointsRequest.Builder setParent(String value)Required. Parent data type of the Data Point collection.
Format: users/{user}/dataTypes/{data_type}, e.g.:
users/me/dataTypes/stepsusers/1234567890/dataTypes/stepsusers/me/dataTypes/weightusers/1234567890/dataTypes/weightThe
{user}can be either the aliasmeor the authenticated user's numeric Health User ID (retrieved via GetIdentity).For a list of the supported data types see the DataPoint data union field.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe parent to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |
setParentBytes(ByteString value)
public ListDataPointsRequest.Builder setParentBytes(ByteString value)Required. Parent data type of the Data Point collection.
Format: users/{user}/dataTypes/{data_type}, e.g.:
users/me/dataTypes/stepsusers/1234567890/dataTypes/stepsusers/me/dataTypes/weightusers/1234567890/dataTypes/weightThe
{user}can be either the aliasmeor the authenticated user's numeric Health User ID (retrieved via GetIdentity).For a list of the supported data types see the DataPoint data union field.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for parent to set. |
| Returns | |
|---|---|
| Type | Description |
ListDataPointsRequest.Builder |
This builder for chaining. |