# Method: annotationStores.export

**Full name**: projects.locations.datasets.annotationStores.export

Export `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation` from the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores#AnnotationStore`. If the request is successful, a detailed response is returned of type `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ExportAnnotationsResponse`, contained in the \[response\]\[google.longrunning.Operation.result.response\] field when the operation finishes. The `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.metadata` field type is `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/OperationMetadata`. Errors are logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).

### HTTP request

`POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/annotationStores/*}:export`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the Annotation store to export annotations to, in the format of `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/annotationStores/{annotationStoreId}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `healthcare.annotationStores.export` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { // Union field `destination` can be only one of the following: "gcsDestination": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores/export#GcsDestination`) }, "bigqueryDestination": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/BigQueryDestination`) } // End of list of possible types for union field `destination`. } ``` |

| Fields ||
|---|---|
| Union field `destination`. Destination for export. `destination` can be only one of the following: ||
| `gcsDestination` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores/export#GcsDestination`)`` The Cloud Storage destination, which requires the `roles/storage.objectAdmin` Cloud IAM role. |
| `bigqueryDestination` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/BigQueryDestination`)`` The BigQuery output destination, which requires two IAM roles: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### 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](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## GcsDestination

The Cloud Storage location for export.

| JSON representation |
|---|
| ``` { "uriPrefix": string } ``` |

| Fields ||
|---|---|
| `uriPrefix` | `string` The Cloud Storage destination to export to. URI for a Cloud Storage directory where the server writes result files, in the format `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash, the service appends one when composing the object path. The user is responsible for creating the Cloud Storage bucket referenced in `uriPrefix`. |