- Resource: CreateSubscriberPayload
- SubscriberConfig
- SubscriberConfig.SubscriptionCreatePolicy
- EndpointAuthorization
- Methods
Resource: CreateSubscriberPayload
Payload for creating a subscriber.
| JSON representation |
|---|
{ "endpointUri": string, "subscriberConfigs": [ { object ( |
| Fields | |
|---|---|
endpointUri |
Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during the |
subscriberConfigs[] |
Optional. Configuration for the subscriber. |
endpointAuthorization |
Required. Authorization mechanism for the subscriber endpoint. The |
SubscriberConfig
Configuration for a subscriber. A notification is sent to a subscription ONLY if the subscriber has a config for the data type.
| JSON representation |
|---|
{
"dataTypes": [
string
],
"subscriptionCreatePolicy": enum ( |
| Fields | |
|---|---|
dataTypes[] |
Required. Supported data types are: "altitude", "distance", "floors", "sleep", "steps", "weight". Values should be in kebab-case. |
subscriptionCreatePolicy |
Required. Policy for subscription creation. |
SubscriberConfig.SubscriptionCreatePolicy
Policy for subscription creation.
| Enums | |
|---|---|
SUBSCRIPTION_CREATE_POLICY_UNSPECIFIED |
Represents an unspecified policy. |
AUTOMATIC |
When using This means you do not need to call |
MANUAL |
Requires subscriptions to be created manually for new users. The developer needs to call CreateSubscription for new users. |
EndpointAuthorization
Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the X-HEALTHAPI-SIGNATURE HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.
| JSON representation |
|---|
{ "secret": string, "secretSet": boolean } |
| Fields | |
|---|---|
secret |
Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the "Authorization" header. The value must include the authorization scheme, e.g., "Bearer |
secretSet |
Output only. Whether the secret is set. |
Methods |
|
|---|---|
|
Registers a new subscriber endpoint to receive notifications. |
|
Deletes a subscriber registration. |
|
Lists all subscribers registered within the owned Google Cloud Project. |
|
Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in. |