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}

users/1234567890/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef

The {user} can be either the alias me or the authenticated user's numeric Health User ID, which can be retrieved by calling GetIdentity (see Identity.health_user_id).

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

The {dataPoint} ID is system-generated. It takes the form users/{user}/dataTypes/{datatype}/dataPoints/{datapoint}.

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.writeonly
  • https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly
  • https://www.googleapis.com/auth/googlehealth.nutrition.writeonly
  • https://www.googleapis.com/auth/googlehealth.sleep.writeonly
  • https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly
  • https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly
  • https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly

For more information, see the OAuth 2.0 Overview.