Users.dataSources.dataPointChanges: list

Requires authorization

Queries for user's data point changes for a particular data source.

Request

HTTP request

GET https://www.googleapis.com/fitness/v1/users/userId/dataSources/dataSourceId/dataPointChanges

Parameters

Parameter name Value Description
Path parameters
dataSourceId string The data stream ID of the data source that created the dataset.
userId string List data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
Optional query parameters
limit integer If specified, no more than this many data point changes will be included in the response.
pageToken string The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/fitness.activity.read
https://www.googleapis.com/auth/fitness.activity.write
https://www.googleapis.com/auth/fitness.location.read
https://www.googleapis.com/auth/fitness.location.write
https://www.googleapis.com/auth/fitness.body.read
https://www.googleapis.com/auth/fitness.body.write
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
https://www.googleapis.com/auth/fitness.blood_pressure.read
https://www.googleapis.com/auth/fitness.blood_pressure.write
https://www.googleapis.com/auth/fitness.blood_glucose.read
https://www.googleapis.com/auth/fitness.blood_glucose.write
https://www.googleapis.com/auth/fitness.oxygen_saturation.read
https://www.googleapis.com/auth/fitness.oxygen_saturation.write
https://www.googleapis.com/auth/fitness.body_temperature.read
https://www.googleapis.com/auth/fitness.body_temperature.write
https://www.googleapis.com/auth/fitness.reproductive_health.read
https://www.googleapis.com/auth/fitness.reproductive_health.write

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "insertedDataPoint": [
    {
      "startTimeNanos": long,
      "endTimeNanos": long,
      "dataTypeName": string,
      "originDataSourceId": string,
      "value": [
        {
          "intVal": integer,
          "fpVal": double,
          "stringVal": string,
          "mapVal": [
            {
              "key": string,
              "value": {
                "fpVal": double
              }
            }
          ]
        }
      ],
      "modifiedTimeMillis": long,
      "rawTimestampNanos": long,
      "computationTimeMillis": long
    }
  ],
  "deletedDataPoint": [
    {
      "startTimeNanos": long,
      "endTimeNanos": long,
      "dataTypeName": string,
      "originDataSourceId": string,
      "value": [
        {
          "intVal": integer,
          "fpVal": double,
          "stringVal": string,
          "mapVal": [
            {
              "key": string,
              "value": {
                "fpVal": double
              }
            }
          ]
        }
      ],
      "modifiedTimeMillis": long,
      "rawTimestampNanos": long,
      "computationTimeMillis": long
    }
  ],
  "nextPageToken": string,
  "dataSourceId": string
}
Property name Value Description Notes
insertedDataPoint[] list Inserted data points for the user.
insertedDataPoint[].startTimeNanos long The start time of the interval represented by this data point, in nanoseconds since epoch.
insertedDataPoint[].endTimeNanos long The end time of the interval represented by this data point, in nanoseconds since epoch.
insertedDataPoint[].dataTypeName string The data type defining the format of the values in this data point.
insertedDataPoint[].originDataSourceId string If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally.
insertedDataPoint[].value[] list Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source.

Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.

insertedDataPoint[].value[].intVal integer Integer value. When this is set, other values must not be set.
insertedDataPoint[].value[].fpVal double Floating point value. When this is set, other values must not be set.
insertedDataPoint[].value[].stringVal string String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled.
insertedDataPoint[].value[].mapVal[] list Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled.
insertedDataPoint[].value[].mapVal[].key string
insertedDataPoint[].value[].mapVal[].value nested object
insertedDataPoint[].value[].mapVal[].value.fpVal double Floating point value.
insertedDataPoint[].modifiedTimeMillis long Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data.
insertedDataPoint[].rawTimestampNanos long The raw timestamp from the original SensorEvent.
insertedDataPoint[].computationTimeMillis long Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp.
deletedDataPoint[] list Deleted data points for the user. Note, for modifications this should be parsed before handling insertions.

deletedDataPoint[].startTimeNanos long The start time of the interval represented by this data point, in nanoseconds since epoch.
deletedDataPoint[].endTimeNanos long The end time of the interval represented by this data point, in nanoseconds since epoch.
deletedDataPoint[].dataTypeName string The data type defining the format of the values in this data point.
deletedDataPoint[].originDataSourceId string If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally.
deletedDataPoint[].value[] list Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source.

Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.

deletedDataPoint[].value[].intVal integer Integer value. When this is set, other values must not be set.
deletedDataPoint[].value[].fpVal double Floating point value. When this is set, other values must not be set.
deletedDataPoint[].value[].stringVal string String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled.
deletedDataPoint[].value[].mapVal[] list Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled.
deletedDataPoint[].value[].mapVal[].key string
deletedDataPoint[].value[].mapVal[].value nested object
deletedDataPoint[].value[].mapVal[].value.fpVal double Floating point value.
deletedDataPoint[].modifiedTimeMillis long Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data.
deletedDataPoint[].rawTimestampNanos long The raw timestamp from the original SensorEvent.
deletedDataPoint[].computationTimeMillis long Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp.
nextPageToken string The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
dataSourceId string The data stream ID of the data source with data point changes.

Send feedback about...