Method: media.upload Stay organized with collections Save and categorize content based on your preferences.
Full name: media.upload
Upload a file into a RagCorpus.
Endpoint
- Upload URI, for media upload requests:
https://{service-endpoint}/upload/v1/{parent}/ragFiles:upload - Metadata URI, for metadata-only requests:
https://{service-endpoint}/v1/{parent}/ragFiles:upload Where{service-endpoint} is one of thesupported service endpoints.
Path parameters
parentstringRequired. The name of the RagCorpus resource into which to upload the file. Format:projects/{project}/locations/{location}/ragCorpora/{ragCorpus}
Request body
The request body contains data with the following structure:
ragFileobject (RagFile)Required. The RagFile to upload.
uploadRagFileConfigobject (UploadRagFileConfig)Required. The config for the RagFiles to be uploaded into the RagCorpus.VertexRagDataService.UploadRagFile.
Response body
Response message forVertexRagDataService.UploadRagFile.
If successful, the response body contains data with the following structure:
UploadRagFileConfig
Config for uploading RagFile.
ragFileTransformationConfigobject (RagFileTransformationConfig)Specifies the transformation config for RagFiles.
| JSON representation |
|---|
{"ragFileTransformationConfig":{object ( |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-27 UTC.