# Method: projects.locations.initialize

Provisions resources for given tenant project. Returns a long running operation.

### HTTP request

`POST https://contentwarehouse.googleapis.com/v1/{location}:initialize`

### Path parameters

| Parameters ||
|---|---|
| `location` | `string` Required. The location to be initialized Format: projects/{projectNumber}/locations/{location}. It takes the form `projects/{project}/locations/{location}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "databaseType": enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/DatabaseType`), "accessControlMode": enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/AccessControlMode`), "kmsKey": string, "documentCreatorDefaultRole": enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations/initialize#DocumentCreatorDefaultRole`), "enableCalUserEmailLogging": boolean } ``` |

| Fields ||
|---|---|
| `databaseType` | ``enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/DatabaseType`)`` Required. The type of database used to store customer data |
| `accessControlMode` | ``enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/AccessControlMode`)`` Required. The access control mode for accessing the customer data |
| `kmsKey` | `string` Optional. The KMS key used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kmsKey is left empty, no encryption will be enforced. |
| `documentCreatorDefaultRole` | ``enum (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations/initialize#DocumentCreatorDefaultRole`)`` Optional. The default role for the person who create a document. |
| `enableCalUserEmailLogging` | `boolean` Optional. Whether to enable CAL user email logging. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `location` resource:

- `contentwarehouse.locations.initialize`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## DocumentCreatorDefaultRole

The default role of the document creator.

| Enums ||
|---|---|
| `DOCUMENT_CREATOR_DEFAULT_ROLE_UNSPECIFIED` | Unspecified, will be default to document admin role. |
| `DOCUMENT_ADMIN` | Document Admin, same as contentwarehouse.googleapis.com/documentAdmin. |
| `DOCUMENT_EDITOR` | Document editor, same as contentwarehouse.googleapis.com/documentEditor. |
| `DOCUMENT_VIEWER` | Document Viewer, same as contentwarehouse.googleapis.com/documentViewer. |