Skip to main content

datasets

Overview

Namedatasets
TypeResource
Idgoogledevelopers.fitness.datasets

Fields

NameDatatypeDescription
minStartTimeNsstringThe smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.
nextPageTokenstringThis token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset.
pointarrayA partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response.
dataSourceIdstringThe data stream ID of the data source that created the points in this dataset.
maxEndTimeNsstringThe largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier.

Methods

NameAccessible byRequired ParamsDescription
users_dataSources_datasets_getSELECTdataSourceId, datasetId, userIdReturns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.
users_dataSources_datasets_deleteDELETEdataSourceId, datasetId, userIdPerforms an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.
users_dataSources_datasets_patchEXECdataSourceId, datasetId, userIdAdds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced.