Required. The name of the Annotation store to which the server imports annotations, in the format projects/{projectId}/locations/{locationId}/datasets/{datasetId}/annotationStores/{annotationStoreId}.
Authorization requires the following IAM permission on the specified resource name:
healthcare.annotationStores.import
Request body
The request body contains data with the following structure:
JSON representation
{// Union field source can be only one of the following:"gcsSource": {object(GcsSource)}// End of list of possible types for union field source.}
Fields
Union field source. The Annotation must be provided in JSON format of the Annotation. For example, an annotation might look like the following: json
{
"annotation_source": {
"cloud_healthcare_source": {
"name":
"projects/test_project/locations/test_location/datasets/test_dataset/fhirStores/test_fhir_store/resources/test_type/test_id"
}
},
"text_annotation": {
"details": {
"patient/text/div/value": {
"findings": [
{
"info_type": "PERSON_NAME",
"start": "4",
"end": "12",
"quote": "John Doe",
},
{
"info_type": "DATE",
"start": "37",
"end": "47",
"quote": "1900-12-24",
}
]
},
"patient/birth_date/value_us": {
"findings": [
{
"info_type": "DATE",
"start": "0",
"end": "10",
"quote": "1900-12-24",
}
]
}
}
}
}
Each file consists of exactly one annotation. source can be only one of the following:
Specifies the configuration for importing data from Cloud Storage.
JSON representation
{"uri": string}
Fields
uri
string
Points to a Cloud Storage URI containing file(s) with content only. The URI must be in the following format: gs://{bucket_id}/{objectId}. The URI can include wildcards in objectId and thus identify multiple files. Supported wildcards: '*' to match 0 or more non-separator characters '**' to match 0 or more characters (including separators). Must be used at the end of a path and with no other wildcards in the path. Can also be used with a file extension (such as .dcm), which imports all files with the extension in the specified directory and its sub-directories. For example, gs://my-bucket/my-directory/**.json imports all files with .json extensions in my-directory/ and its sub-directories. '?' to match 1 character All other URI formats are invalid. Files matching the wildcard are expected to contain content only, no metadata.
[[["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 API imports annotations into an Annotation store from specified data sources, primarily using Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful import requests return a detailed response of type \u003ccode\u003eImportAnnotationsResponse\u003c/code\u003e upon operation completion.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e parameter in the HTTP request specifies the target Annotation store, and importing requires the \u003ccode\u003ehealthcare.annotationStores.import\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body uses the union field \u003ccode\u003esource\u003c/code\u003e, which supports only \u003ccode\u003egcsSource\u003c/code\u003e to import data, and each file in the specified location is expected to contain exactly one annotation in JSON format.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcsSource\u003c/code\u003e URI in the request must follow a specific format \u003ccode\u003egs://{bucket_id}/{objectId}\u003c/code\u003e, and supports wildcards for matching multiple files in Cloud Storage.\u003c/p\u003e\n"]]],[],null,["# Method: annotationStores.import\n\n**Full name**: projects.locations.datasets.annotationStores.import\n\nImport [Annotations](/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation) to the [Annotation store](/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores#AnnotationStore) by loading data from the specified sources. If the request is successful, a detailed response is returned as of type [ImportAnnotationsResponse](/healthcare-api/docs/reference/rest/Shared.Types/ImportAnnotationsResponse), contained in the \\[response\\]\\[google.longrunning.Operation.result.response\\] field when the operation finishes. The [metadata](/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.metadata) field type is [OperationMetadata](/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)).\n\n### HTTP request\n\n`POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/annotationStores/*}:import`\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\nGcsSource\n---------\n\nSpecifies the configuration for importing data from Cloud Storage."]]