Method: consents.activate

Full name: projects.locations.datasets.consentStores.consents.activate

Activates the latest revision of the specified Consent by committing a new revision with state updated to ACTIVE. If the latest revision of the specified Consent is in the ACTIVE state, no new revision is committed. A FAILED_PRECONDITION error occurs if the latest revision of the specified Consent is in the REJECTED or REVOKED state.

HTTP request

POST https://healthcare.googleapis.com/v1/{name=projects/*/locations/*/datasets/*/consentStores/*/consents/*}:activate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Consent to activate, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consents/{consentId}. An INVALID_ARGUMENT error occurs if revisionId is specified in the name.

Authorization requires the following IAM permission on the specified resource name:

  • healthcare.consents.activate

Request body

The request body contains data with the following structure:

JSON representation
{
  "consentArtifact": string,

  // Union field expiration can be only one of the following:
  "expireTime": string,
  "ttl": string
  // End of list of possible types for union field expiration.
}
Fields
consentArtifact

string

Required. The resource name of the Consent artifact that contains documentation of the user's consent, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consentArtifacts/{consent_artifact_id}. If the draft Consent had a Consent artifact, this Consent artifact overwrites it.

Authorization requires the following IAM permission on the specified resource consentArtifact:

  • healthcare.consentArtifacts.get
Union field expiration. Optional. Allows setting expiration time for Consents. Expired consents are ignored in access determination methods such as [CheckDataAccess]. This value overrides the expiration duration configured for the consent store. expiration can be only one of the following:
expireTime

string(Timestamp format)

Timestamp in UTC of when this Consent is considered expired.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

ttl

string(Duration format)

The time to live for this Consent from when it is marked as active.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Response body

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

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.