Method: projects.locations.collections.engines.sessions.listSessionFileMetadata

Lists metadata for all files in the current session.

HTTP request

GET https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}:listSessionFileMetadata

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Session. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

Request body

The request body must be empty.

Response body

Response message for AssistantService.ListSessionFileMetadata method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "fileMetadata": [
    {
      object (FileMetadata)
    }
  ],
  "totalQuotaPercentage": number
}
Fields
fileMetadata[]

object (FileMetadata)

The FileMetadatas.

totalQuotaPercentage

number

The total quota percentage used by all the files.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • discoveryengine.sessions.listSessionFileMetadata

For more information, see the IAM documentation.

FileMetadata

The metadata of the file.

JSON representation
{
  "fileId": string,
  "name": string,
  "mimeType": string,
  "byteSize": string,
  "tokenCount": string,
  "quotaPercentage": number,
  "selected": boolean
}
Fields
fileId

string

The ID of the file.

name

string

The name of the file uploaded.

mimeType

string

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

byteSize

string (int64 format)

The size of the context file in bytes.

tokenCount

string (int64 format)

The length of the file measured in tokens.

quotaPercentage

number

The percentage of the quota used by the file.

selected

boolean

If the file is selected to be used.