Initiates a Long-Running Operation to import Documents into a DataStore.
A file that was already imported successfully is skipped unless its Cloud Storage object has been overwritten since or, for SOURCE_FORMAT_DOCUMENT_JSON, its metadata has changed. Files that failed in an earlier import are processed again. Individual files that can't be imported are reported in the error report (see ImportOutputConfig.error_gcs_prefix) rather than failing the whole import.
dataStores.importDocuments, dataStores.purgeDocuments and dataStores.patch run one at a time per DataStore. While one runs, one more can wait; any further request fails with ABORTED until the running operation finishes. To import many files, list them all in inputUris of one request rather than sending parallel requests.
HTTP request
POST https://vectorsearch.googleapis.com/v1beta/{name}:importDocuments
Path parameters
| Parameters | |
|---|---|
name |
Required. The resource name of the DataStore to import Documents into. Format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "importOutputConfig": { object ( |
| Fields | |
|---|---|
importOutputConfig |
Optional. Configuration of destination for import documents output: where to write the import's error report. |
| Required. The source of the input. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
gcsSource |
Cloud Storage location for the input content. With the default |
| End of mutually exclusive fields. | |
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/vectorsearch
For more information, see the Authentication Overview.
ImportOutputConfig
Configuration of destination for import documents related output.
| JSON representation |
|---|
{ "errorGcsPrefix": string } |
| Fields | |
|---|---|
errorGcsPrefix |
Optional. URI prefix of the Cloud Storage location to write any errors encountered during the import. The prefix must not contain any objects. Errors are written to sharded files under this prefix, one per line, as a JSON-encoded |