REST Resource: projects.locations.collections.dataStores.sessions

Resource: Session

External session proto definition.

JSON representation
{
  "name": string,
  "displayName": string,
  "state": enum (State),
  "userPseudoId": string,
  "turns": [
    {
      object (Turn)
    }
  ],
  "labels": [
    string
  ],
  "startTime": string,
  "endTime": string,
  "isPinned": boolean
}
Fields
name

string

Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*

displayName

string

Optional. The display name of the session.

This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.

state

enum (State)

The state of the session.

userPseudoId

string

A unique identifier for tracking users.

turns[]

object (Turn)

Turns.

labels[]

string

Optional. The labels for the session. Can be set as filter in ListSessionsRequest.

startTime

string (Timestamp format)

Output only. The time the session started.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endTime

string (Timestamp format)

Output only. The time the session finished.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

isPinned

boolean

Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.

State

Enumeration of the state of the session.

Enums
STATE_UNSPECIFIED State is unspecified.
IN_PROGRESS The session is currently open.

Turn

Represents a turn, including a query from the user and a answer from service.

JSON representation
{
  "query": {
    object (Query)
  },
  "answer": string,
  "assistAnswer": string,
  "detailedAnswer": {
    object (Answer)
  },
  "detailedAssistAnswer": {
    object (AssistAnswer)
  },
  "queryConfig": {
    string: string,
    ...
  }
}
Fields
query

object (Query)

Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn

answer

string

Optional. The resource name of the answer to the user query.

Only set if the answer generation (/answer API call) happened in this turn.

assistAnswer

string

Output only. The resource name of the Assistant answer to the user query.

Only set if an assist call (/assist API call) happened in this turn.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer}. To get all AssistAnswers for a session set GetSessionRequest.include_answer_details to true. Alternatively, to get an individual AssistAnswer resource, use the AssistAnswerService.GetAssistAnswer API.

detailedAnswer

object (Answer)

Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.

detailedAssistAnswer

object (AssistAnswer)

Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.

queryConfig

map (key: string, value: string)

Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix "google." is reserved for Google-developed functionality.

Query

Defines a user inputed query.

JSON representation
{
  "queryId": string,
  "parts": [
    {
      object (QueryPart)
    }
  ],

  // Union field content can be only one of the following:
  "text": string
  // End of list of possible types for union field content.
}
Fields
queryId

string

Output only. Unique ID for the query.

parts[]

object (QueryPart)

Query content parts.

Union field content. Query content. content can be only one of the following:
text

string

Plain text.

QueryPart

Represents a part or the whole of a content, used to represent a query. A query can be made up of multiple parts.

JSON representation
{
  "mimeType": string,

  // Union field payload can be only one of the following:
  "text": string,
  "uiJsonPayload": string,
  "personReference": {
    object (PersonReference)
  },
  "driveDocumentReference": {
    object (DriveDocumentReference)
  },
  "documentReference": {
    object (DocumentReference)
  }
  // End of list of possible types for union field payload.
}
Fields
mimeType

string

Optional. The IANA standard MIME type of the data. See https://www.iana.org/assignments/media-types/media-types.xhtml. This field is optional. If not set, the default assumed MIME type is "text/plain" for the "data" field.

Union field payload. The payload of the query part. payload can be only one of the following:
text

string

Text content.

uiJsonPayload

string

This field is expected to be a ui message in JSON format. As of Q1 2026, uiJsonPayload is only supported for A2UI messages.

personReference

object (PersonReference)

Reference to a person.

driveDocumentReference

object (DriveDocumentReference)

Reference to a Google Drive document.

documentReference

object (DocumentReference)

Other VAIS Document references.

PersonReference

Represents a person reference.

JSON representation
{
  "documentName": string,
  "personId": string,
  "email": string,
  "displayName": string,
  "displayPhotoUri": string,
  "destinationUri": string,
  "fileId": string
}
Fields
documentName

string

The full resource name of the person. Format: projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*.

personId

string

The person id of the person.

email

string

The email of the person.

displayName

string

The display name of the person.

displayPhotoUri

string

The display photo url of the person.

destinationUri

string

The destination uri of the person.

fileId

string

Output only. The file id of the person data stored in the session context files.

DriveDocumentReference

Represents a Google Drive document reference.

JSON representation
{
  "driveId": string,
  "documentName": string,
  "displayTitle": string,
  "destinationUri": string,
  "iconUri": string,
  "fileId": string
}
Fields
driveId

string

The Drive id of the document.

documentName

string

The full resource name of the document. Format: projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*.

displayTitle

string

The display title of the reference.

destinationUri

string

The destination uri of the reference.

iconUri

string

The icon uri of the Drive document reference.

fileId

string

Output only. The file id of the Drive document data stored in the session context files.

DocumentReference

Represents a document reference.

JSON representation
{
  "documentName": string,
  "displayTitle": string,
  "destinationUri": string,
  "iconUri": string,
  "fileId": string,
  "urlForConnector": string
}
Fields
documentName

string

The full resource name of the document. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}.

displayTitle

string

The display title of the reference.

destinationUri

string

The destination uri of the reference.

iconUri

string

The icon uri of the reference.

fileId

string

Output only. The file id of the document data stored in the session context files.

urlForConnector

string

Input only. The urlForConnector of the document returned by Federated Search.

Methods

create

Creates a Session.

delete

Deletes a Session.

get

Gets a Session.

list

Lists all Sessions by their parent DataStore.

patch

Updates a Session.