---
title: "POST /v1/{+parent}/ragFiles:import"
method: POST
path: "/v1/{+parent}/ragFiles:import"
tags: ["projects"]
---

# POST /v1/{+parent}/ragFiles:import

`POST /v1/{+parent}/ragFiles:import`

Import files from Google Cloud Storage or Google Drive into a RagCorpus.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1ImportRagFilesRequest — Request message for VertexRagDataService.ImportRagFiles.
  - `importRagFilesConfig` GoogleCloudAiplatformV1ImportRagFilesConfig — Config for importing RagFiles.
    - `partialFailureBigquerySink` GoogleCloudAiplatformV1BigQueryDestination — The BigQuery location for the output content.
      - `outputUri` string — Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
    - `importResultBigquerySink` GoogleCloudAiplatformV1BigQueryDestination — The BigQuery location for the output content.
      - `outputUri` string — Required. BigQuery URI to a project or table, up to 2000 characters long. When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist. Accepted forms: * BigQuery path. For example: `bq://projectId` or `bq://projectId.bqDatasetId` or `bq://projectId.bqDatasetId.bqTableId`.
    - `maxEmbeddingRequestsPerMin` integer — Optional. The max number of queries per minute that this job is allowed to make to the embedding model specified on the corpus. This value is specific to this job and not shared across other import jobs. Consult the Quotas page on the project to set an appropriate value here. If unspecified, a default value of 1,000 QPM would be used.
    - `slackSource` GoogleCloudAiplatformV1SlackSource — The Slack source for the ImportRagFilesRequest.
      - `channels` GoogleCloudAiplatformV1SlackSourceSlackChannels[] — Required. The Slack channels.
        - `apiKeyConfig` GoogleCloudAiplatformV1ApiAuthApiKeyConfig — The API secret.
          - `apiKeyString` string — The API key string. Either this or `api_key_secret_version` must be set.
          - `apiKeySecretVersion` string — Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
        - `channels` GoogleCloudAiplatformV1SlackSourceSlackChannelsSlackChannel[] — Required. The Slack channel IDs.
          - `channelId` string — Required. The Slack channel ID.
          - `endTime` string, google-datetime — Optional. The ending timestamp for messages to import.
          - `startTime` string, google-datetime — Optional. The starting timestamp for messages to import.
    - `sharePointSources` GoogleCloudAiplatformV1SharePointSources — The SharePointSources to pass to ImportRagFiles.
      - `sharePointSources` GoogleCloudAiplatformV1SharePointSourcesSharePointSource[] — The SharePoint sources.
        - `clientSecret` GoogleCloudAiplatformV1ApiAuthApiKeyConfig — The API secret.
          - `apiKeyString` string — The API key string. Either this or `api_key_secret_version` must be set.
          - `apiKeySecretVersion` string — Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
        - `fileId` string — Output only. The SharePoint file id. Output only.
        - `sharepointFolderId` string — The ID of the SharePoint folder to download from.
        - `sharepointSiteName` string — The name of the SharePoint site to download from. This can be the site name or the site id.
        - `driveId` string — The ID of the drive to download from.
        - `tenantId` string — Unique identifier of the Azure Active Directory Instance.
        - `driveName` string — The name of the drive to download from.
        - `sharepointFolderPath` string — The path of the SharePoint folder to download from.
        - `clientId` string — The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
    - `gcsSource` GoogleCloudAiplatformV1GcsSource — The Google Cloud Storage location for the input content.
      - `uris` string[] — Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
    - `importResultGcsSink` GoogleCloudAiplatformV1GcsDestination — The Google Cloud Storage location where the output is to be written to.
      - `outputUriPrefix` string — Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist.
    - `partialFailureGcsSink` GoogleCloudAiplatformV1GcsDestination — The Google Cloud Storage location where the output is to be written to.
      - `outputUriPrefix` string — Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist.
    - `googleDriveSource` GoogleCloudAiplatformV1GoogleDriveSource — The Google Drive location for the input content.
      - `resourceIds` GoogleCloudAiplatformV1GoogleDriveSourceResourceId[] — Required. Google Drive resource IDs.
        - `resourceType` 'RESOURCE_TYPE_UNSPECIFIED' | 'RESOURCE_TYPE_FILE' | 'RESOURCE_TYPE_FOLDER' — Required. The type of the Google Drive resource.
        - `resourceId` string — Required. The ID of the Google Drive resource.
    - `ragFileTransformationConfig` GoogleCloudAiplatformV1RagFileTransformationConfig — Specifies the transformation config for RagFiles.
      - `ragFileChunkingConfig` GoogleCloudAiplatformV1RagFileChunkingConfig — Specifies the size and overlap of chunks for RagFiles.
        - `fixedLengthChunking` GoogleCloudAiplatformV1RagFileChunkingConfigFixedLengthChunking — Specifies the fixed length chunking config.
          - `chunkSize` integer — The size of the chunks.
          - `chunkOverlap` integer — The overlap between chunks.
    - `ragFileParsingConfig` GoogleCloudAiplatformV1RagFileParsingConfig — Specifies the parsing config for RagFiles.
      - `layoutParser` GoogleCloudAiplatformV1RagFileParsingConfigLayoutParser — Document AI Layout Parser config.
        - `maxParsingRequestsPerMin` integer — The maximum number of requests the job is allowed to make to the Document AI processor per minute. Consult https://cloud.google.com/document-ai/quotas and the Quota page for your project to set an appropriate value here. If unspecified, a default value of 120 QPM would be used.
        - `processorName` string — The full resource name of a Document AI processor or processor version. The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the `additional_config.parse_as_scanned_pdf` field must be false. Format: * `projects/{project_id}/locations/{location}/processors/{processor_id}` * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
      - `llmParser` GoogleCloudAiplatformV1RagFileParsingConfigLlmParser — Specifies the LLM parsing for RagFiles.
        - `modelName` string — The name of a LLM model used for parsing. Format: * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
        - `maxParsingRequestsPerMin` integer — The maximum number of requests the job is allowed to make to the LLM model per minute. Consult https://cloud.google.com/vertex-ai/generative-ai/docs/quotas and your document size to set an appropriate value here. If unspecified, a default value of 5000 QPM would be used.
        - `customParsingPrompt` string — The prompt to use for parsing. If not specified, a default prompt will be used.
    - `jiraSource` GoogleCloudAiplatformV1JiraSource — The Jira source for the ImportRagFilesRequest.
      - `jiraQueries` GoogleCloudAiplatformV1JiraSourceJiraQueries[] — Required. The Jira queries.
        - `customQueries` string[] — A list of custom Jira queries to import. For information about JQL (Jira Query Language), see https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
        - `projects` string[] — A list of Jira projects to import in their entirety.
        - `email` string — Required. The Jira email address.
        - `serverUri` string — Required. The Jira server URI.
        - `apiKeyConfig` GoogleCloudAiplatformV1ApiAuthApiKeyConfig — The API secret.
          - `apiKeyString` string — The API key string. Either this or `api_key_secret_version` must be set.
          - `apiKeySecretVersion` string — Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
    - `rebuildAnnIndex` boolean — Rebuilds the ANN index to optimize for recall on the imported data. Only applicable for RagCorpora running on RagManagedDb with `retrieval_strategy` set to `ANN`. The rebuild will be performed using the existing ANN config set on the RagCorpus. To change the ANN config, please use the UpdateRagCorpus API. Default is false, i.e., index is not rebuilt.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/aiplatform.md) · [All operations](https://skmtc.net/google/apis/aiplatform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/aiplatform/versions/b608d71b91f0/schema)
