Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.fhirStores.fhir.executeBundle
Executes all the requests in the given Bundle.
Implements the FHIR standard batch/transaction interaction and history operations. (DSTU2, STU3, R4, R5).
Supports all interactions within a bundle, except search. This method accepts Bundles of type batch, transaction and history, processing batch and transaction bundles according to the batch processing rules (DSTU2, STU3, R4, R5) and transaction processing rules (DSTU2, STU3, R4, R5).
The request body must contain a JSON-encoded FHIR Bundle resource, and the request headers must contain Content-Type: application/fhir+json.
For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a Bundle resource of type batch-response or transaction-response containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction or history bundle, the response body contains a JSON-encoded OperationOutcome resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.
This method checks permissions for each request in the bundle. The executeBundle permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the healthcare.fhirResources.create permission. history bundles also check the import permission.
You can use audit logs to view the permissions for executeBundle and each request in the bundle. For more information, see Viewing Cloud Audit logs.
[[["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\u003eExecutes all requests within a given FHIR Bundle, supporting batch, transaction, and history operations as per FHIR standards (DSTU2, STU3, R4).\u003c/p\u003e\n"],["\u003cp\u003eAccepts Bundles of type \u003ccode\u003ebatch\u003c/code\u003e, \u003ccode\u003etransaction\u003c/code\u003e, and \u003ccode\u003ehistory\u003c/code\u003e, adhering to their respective processing rules, but does not support search operations.\u003c/p\u003e\n"],["\u003cp\u003eRequires a JSON-encoded FHIR \u003ccode\u003eBundle\u003c/code\u003e resource in the request body with \u003ccode\u003eContent-Type: application/fhir+json\u003c/code\u003e in the headers.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful execution of a batch or transaction bundle will result in a response containing a \u003ccode\u003ebatch-response\u003c/code\u003e or \u003ccode\u003etransaction-response\u003c/code\u003e Bundle, while errors in \u003ccode\u003etransaction\u003c/code\u003e or \u003ccode\u003ehistory\u003c/code\u003e bundles return an \u003ccode\u003eOperationOutcome\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003eexecuteBundle\u003c/code\u003e permission along with permissions for each individual request within the bundle, such as \u003ccode\u003ehealthcare.fhirResources.create\u003c/code\u003e, with audit logs available for tracking permissions.\u003c/p\u003e\n"]]],[],null,["# Method: fhir.executeBundle\n\n**Full name**: projects.locations.datasets.fhirStores.fhir.executeBundle\n\nExecutes all the requests in the given Bundle.\n\nImplements the FHIR standard batch/transaction interaction and history operations. ([DSTU2](https://hl7.org/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/fhir/STU3/http.html#transaction), [R4](https://hl7.org/fhir/R4/http.html#transaction), [R5](https://hl7.org/fhir/R5/http.html#transaction)).\n\nSupports all interactions within a bundle, except search. This method accepts Bundles of type `batch`, `transaction` and `history`, processing `batch` and `transaction` bundles according to the batch processing rules ([DSTU2](https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/fhir/R4/http.html#brules), [R5](https://hl7.org/fhir/R5/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/fhir/R4/http.html#trules), [R5](https://hl7.org/fhir/R5/http.html#trules)).\n\nThe request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`.\n\nFor a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a `transaction` or `history` bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.\n\nThis method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. `history` bundles also check the `import` permission.\n\nYou can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging).\n\nFor samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).\n\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1beta1/{parent=projects/*/locations/*/datasets/*/fhirStores/*}/fhir`\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 an instance of [HttpBody](/healthcare-api/docs/reference/rest/Shared.Types/HttpBody).\n\n### Response body\n\nIf successful, the response is a generic HTTP response whose format is defined by the method.\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)."]]