Imports a file to an Agent. Currently only No-code agents are supported.
HTTP request
POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/files:import
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The resource name of the |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "fileName": string, "mimeType": string } |
| Fields | |
|---|---|
fileName |
Required. The name of the file. |
mimeType |
Optional. The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml. This field is required when the data source does not provide the content type. |
Response body
Response for the AgentService.ImportAgentFile method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"agentFile": {
object ( |
| Fields | |
|---|---|
agentFile |
The imported |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.readwritehttps://www.googleapis.com/auth/discoveryengine.assist.readwrite
For more information, see the Authentication Overview.
AgentFile
Describes a file used internally by an agent as a context on each invocation.
| JSON representation |
|---|
{ "name": string, "fileName": string, "mimeType": string } |
| Fields | |
|---|---|
name |
Identifier. The resource name of the file. Format: |
fileName |
Required. The name of the file. |
mimeType |
Immutable. The content type of the file. |