Stay organized with collections
Save and categorize content based on your preferences.
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
Required. The resource name of the Consent to activate, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consents/{consent_id}. 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:
Timestamp in UTC of when this Consent is considered expired.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-23 UTC."],[[["\u003cp\u003eThis endpoint, \u003ccode\u003eprojects.locations.datasets.consentStores.consents.activate\u003c/code\u003e, activates the latest revision of a specified Consent by creating a new revision with the \u003ccode\u003estate\u003c/code\u003e set to \u003ccode\u003eACTIVE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eActivating a Consent requires a \u003ccode\u003econsentArtifact\u003c/code\u003e resource name, which serves as documentation of the user's consent and can overwrite any existing artifact.\u003c/p\u003e\n"],["\u003cp\u003eThe Consent activation process will fail if the latest revision is in \u003ccode\u003eREJECTED\u003c/code\u003e or \u003ccode\u003eREVOKED\u003c/code\u003e states, resulting in a \u003ccode\u003eFAILED_PRECONDITION\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eYou can set an expiration for the Consent either by specifying an exact \u003ccode\u003eexpireTime\u003c/code\u003e or a \u003ccode\u003ettl\u003c/code\u003e (time to live), which overrides any store configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires appropriate IAM permissions, specifically \u003ccode\u003ehealthcare.consents.activate\u003c/code\u003e and \u003ccode\u003ehealthcare.consentArtifacts.get\u003c/code\u003e, along with one of two OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-healthcare\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: consents.activate\n\n**Full name**: projects.locations.datasets.consentStores.consents.activate\n\nActivates the latest revision of the specified [Consent](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.consents#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](/healthcare-api/docs/reference/rest/Shared.Types/Code#ENUM_VALUES.FAILED_PRECONDITION) error occurs if the latest revision of the specified Consent is in the `REJECTED` or `REVOKED` state.\n\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1/{name=projects/*/locations/*/datasets/*/consentStores/*/consents/*}:activate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Consent](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.consents#Consent).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-healthcare`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]