Users.dataSources.dataPointChanges: list

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

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:

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

For more information, see the authentication and authorization page.

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.

WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
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 DO NOT USE THIS FIELD. It is ignored, and not stored.
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.

WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
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 DO NOT USE THIS FIELD. It is ignored, and not stored.
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.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.