Method: projects.subscribers.patch

Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in.

Endpoint Verification: If the endpointUri or endpointAuthorization field is included in the updateMask, the backend will re-verify the endpoint. The verification process is the same as described in subscribers.create:

  1. Verification with Authorization: POST to the new or existing endpointUri with the new or existing Authorization secret. Expects HTTP 201 Created.
  2. Verification without Authorization: POST to the endpointUri without the Authorization header. Expects HTTP 401 Unauthorized or 403 Forbidden.

Both tests must pass using the potentially updated values for the subscriber update to succeed. If verification fails, the update will not be applied, and an error will be returned.

HTTP request

PATCH https://health.googleapis.com/v4/{subscriber.name=projects/*/subscribers/*}

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
subscriber.name

string

Identifier. The resource name of the Subscriber. Format: projects/{project}/subscribers/{subscriber} The {project} ID is a Google Cloud Project ID or Project Number. The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef It takes the form projects/{project}/subscribers/{subscriber}.

Query parameters

Parameters
updateMask

string (FieldMask format)

Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields: - endpointUri - subscriberConfigs - endpointAuthorization

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 Subscriber.

Response body

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

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the OAuth 2.0 Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • health.subscribers.update

For more information, see the IAM documentation.