Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.consentStores.create
Creates a new consent store in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error.
HTTP request
POST https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*}/consentStores
Required. The name of the dataset this consent store belongs to.
Authorization requires the following IAM permission on the specified resource parent:
healthcare.consentStores.create
Query parameters
Parameters
consentStoreId
string
Required. The ID of the consent store to create. The string must match the following regex: [\p{L}\p{N}_\-\.]{1,256}. Cannot be changed after creation.
Request body
The request body contains an instance of ConsentStore.
Response body
If successful, the response body contains a newly created instance of ConsentStore.
[[["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-06-27 UTC."],[[["\u003cp\u003eThis endpoint \u003ccode\u003eprojects.locations.datasets.consentStores.create\u003c/code\u003e creates a new consent store within a specified dataset.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a unique \u003ccode\u003econsentStoreId\u003c/code\u003e for the new store, which must adhere to a specific regex pattern and cannot be modified after creation.\u003c/p\u003e\n"],["\u003cp\u003eThe operation requires the \u003ccode\u003ehealthcare.consentStores.create\u003c/code\u003e IAM permission on the parent dataset and the use of the specified OAuth scopes.\u003c/p\u003e\n"],["\u003cp\u003eAttempting to create a consent store with an ID that already exists will result in an \u003ccode\u003eALREADY_EXISTS\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe data needed to create the new consent store is provided in the request body as an instance of the \u003ccode\u003eConsentStore\u003c/code\u003e object, and a successfully creation returns an instance of that same object.\u003c/p\u003e\n"]]],[],null,["# Method: consentStores.create\n\n**Full name**: projects.locations.datasets.consentStores.create\n\nCreates a new [consent store](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore) in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error.\n\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*}/consentStores`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [ConsentStore](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [ConsentStore](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore).\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)."]]