Required. The name of the FHIR store to export resource from, in the format of projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}.
Authorization requires the following IAM permission on the specified resource name:
healthcare.fhirStores.export
Request body
The request body contains data with the following structure:
JSON representation
{"_since": string,"_type": string,// Union field destination can be only one of the following:"gcsDestination": {object(GcsDestination)},"bigqueryDestination": {object(BigQueryDestination)}// End of list of possible types for union field destination.}
Fields
_since
string
If provided, only resources updated after this time are exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z. The time must be specified to the second and include a time zone.
_type
string
String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are exported.
Union field destination. The output destination of the export.
To enable the Cloud Healthcare API to write to resources in your project such as Cloud Storage buckets, you must give the consumer Cloud Healthcare API service account the proper permissions. The service account is: service-{PROJECT_NUMBER}@gcp-sa-healthcare.iam.gserviceaccount.com. The PROJECT_NUMBER identifies the project that contains the source FHIR store. To get the project number, go to the GCP Console Dashboard. destination can be only one of the following:
The Healthcare Service Agent account requires the roles/storage.objectAdmin role on the Cloud Storage location.
The exported outputs are organized by FHIR resource types. The server creates one object per resource type. Each object contains newline delimited JSON, and each line is a FHIR resource.
URI for a Cloud Storage directory where result files should be written, in the format of 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.
[[["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 method allows you to export FHIR resources from a specified FHIR store to a chosen destination.\u003c/p\u003e\n"],["\u003cp\u003eThe export operation's status can be monitored using the \u003ccode\u003eoperations.get\u003c/code\u003e method, and it will either provide an error in the \u003ccode\u003eerror\u003c/code\u003e field or a detailed response of type \u003ccode\u003eExportResourcesResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eExports can be filtered by specifying a \u003ccode\u003e_since\u003c/code\u003e date/time to export only resources updated after that point and/or a \u003ccode\u003e_type\u003c/code\u003e to define which resource types are exported.\u003c/p\u003e\n"],["\u003cp\u003eYou can choose to export the FHIR data to either a Cloud Storage location or a BigQuery location, with specific IAM roles required for the service agent on each destination.\u003c/p\u003e\n"],["\u003cp\u003eThe URL for this process uses a specific format, using gRPC transcoding, and it requires a defined \u003ccode\u003ename\u003c/code\u003e parameter of the FHIR store to export resources from.\u003c/p\u003e\n"]]],[],null,["# Method: fhirStores.export\n\n**Full name**: projects.locations.datasets.fhirStores.export\n\nExport resources from the FHIR store to the specified destination.\n\nThis method returns an [Operation](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation) that can be used to track the status of the export by calling `operations.get`.\n\nImmediate fatal errors appear in the [error](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.error) field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type [ExportResourcesResponse](/healthcare-api/docs/reference/rest/Shared.Types/ExportResourcesResponse) is returned in the [response](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.response) field. The [metadata](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.metadata) field type for this operation is [OperationMetadata](/healthcare-api/docs/reference/rest/v1/OperationMetadata).\n\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1/{name=projects/*/locations/*/datasets/*/fhirStores/*}:export`\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 [Operation](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\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).\n\nGcsDestination\n--------------\n\nThe configuration for exporting to Cloud Storage."]]