Method: projects.subscribers.subscriptions.list

Lists all active subscriptions for a given subscriber. This can be filtered, for example, by user or data type.

HTTP request

GET https://health.googleapis.com/v4/{parent=projects/*/subscribers/*}/subscriptions

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
parent

string

Required. The parent subscriber. Format: projects/{project}/subscribers/{subscriber} The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise. It takes the form projects/{project}/subscribers/{subscriber}.

Query parameters

Parameters
filter

string

Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - user - dataType

The user identifier (e.g., user1 in users/user1) refers to the public healthUserId

Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (dataType = "sleep" OR dataType = "weight")

pageSize

integer

Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken

string

Optional. A page token, received from a previous subscriptions.list call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to subscriptions.list must match the call that provided the page token.

Request body

The request body must be empty.

Response body

Response message for subscriptions.list.

If successful, the response body contains data with the following structure:

JSON representation
{
  "subscriptions": [
    {
      object (Subscription)
    }
  ],
  "nextPageToken": string
}
Fields
subscriptions[]

object (Subscription)

The subscriptions from the specified subscriber.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

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 parent resource:

  • health.subscriptions.list

For more information, see the IAM documentation.