- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Examples
- Try it!
Creates a subscription for a specific user to a specific subscriber. This method requires the subscriber to have a SubscriptionCreatePolicy set to MANUAL for the given data types.
HTTP request
POST 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 |
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 |
Query parameters
| Parameters | |
|---|---|
subscriptionId |
Optional. The {subscriptionId} is user-settable (4-36 chars, matching /a-z/) or system-generated otherwise. If provided, the ID must be unique within the parent subscriber. |
Request body
The request body contains an instance of CreateSubscriptionPayload.
Response body
If successful, the response body contains a newly created instance of Subscription.
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.create
For more information, see the IAM documentation.