Method: users.dataTypes.dataPoints.patch

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

HTTP request

PATCH https://health.googleapis.com/v4/{dataPoint.name=users/*/dataTypes/*/dataPoints/*}

The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog

Path parameters

Parameters
dataPoint.name

string

Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty.

Format: users/{user}/dataTypes/{dataType}/dataPoints/{dataPoint}

Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef

The {user} ID is a system-generated identifier, as described in [Profile.encoded_id][google.devicesandservices.health.v4.Profile.encoded_id].

The {dataType} ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. total-calories for the totalCalories field.

The {dataPoint} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens. It takes the form users/{user}/dataTypes/{datatype}/dataPoints/{datapoint}.

Query parameters

Parameters
updateMask

string (FieldMask format)

Optional. The list of fields to update.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of DataPoint.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements
  • https://www.googleapis.com/auth/googlehealth.location
  • https://www.googleapis.com/auth/googlehealth.nutrition
  • https://www.googleapis.com/auth/googlehealth.sleep

For more information, see the OAuth 2.0 Overview.