Method: projects.locations.conversations.messages.list

Lists all messages for a given conversation.

HTTP request

GET https://geminidataanalytics.googleapis.com/v1alpha/{parent=projects/*/locations/*/conversations/*}/messages

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The conversation to list messages under. Format: projects/{project}/locations/{location}/conversations/{conversationId}

Query parameters

Parameters
pageSize

integer

Optional. Requested page size. Server may return fewer items than requested. The max page size is 100. All larger page sizes will be coerced to 100. If unspecified, server will pick 50 as an approperiate default.

pageToken

string

Optional. A token identifying a page of results the server should return.

filter

string

Optional. Filtering results. See AIP-160 for syntax.

messages.list allows filtering by: * createTime (e.g., createTime > "2025-01-28T06:51:56-08:00") * updateTime

Request body

The request body must be empty.

Response body

Response for listing chat messages.

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

JSON representation
{
  "messages": [
    {
      object (StorageMessage)
    }
  ],
  "nextPageToken": string
}
Fields
messages[]

object (StorageMessage)

The list of chat messages.

nextPageToken

string

A token identifying a page of results the server should return.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

StorageMessage

A stored message containing user message or system message.

JSON representation
{
  "messageId": string,
  "message": {
    object (Message)
  }
}
Fields
messageId

string

The unique resource name of a chat message.

message

object (Message)

The message content.