Method: projects.locations.collections.engines.assistants.agents.files.import

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

string

Required. The resource name of the Agent. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}

Request body

The request body contains data with the following structure:

JSON representation
{
  "fileName": string,
  "mimeType": string
}
Fields
fileName

string

Required. The name of the file.

mimeType

string

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

If successful, the response body contains an instance of ImportAgentFileResponse.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.