Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Membership resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty Membership resource.
Requires user authentication. To list events, the authenticated user must be a member of the space.
Required. Resource name of the Google Chat space where the events occurred.
Format: spaces/{space}.
Query parameters
Parameters
pageSize
integer
Optional. The maximum number of space events returned. The service might return fewer than this value.
Negative values return an INVALID_ARGUMENT error.
pageToken
string
Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
filter
string
Required. A query filter.
You must specify at least one event type (eventType) using the has : operator. To filter by multiple event types, use the OR operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (google.workspace.chat.reaction.v1.created), the server also returns batch new reactions events (google.workspace.chat.reaction.v1.batchCreated). For a list of supported event types, see the SpaceEvents reference documentation.
Optionally, you can also filter by start time (startTime) and end time (endTime):
startTime: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days.
endTime: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request.
To specify a start or end time, use the equals = operator and format in RFC-3339. To filter by both startTime and endTime, use the AND operator.
For example, the following queries are valid:
startTime="2023-08-23T19:20:33+00:00" AND
endTime="2023-08-23T19:21:54+00:00"
startTime="2023-08-23T19:20:33+00:00" AND
(eventTypes:"google.workspace.chat.space.v1.updated" OR
eventTypes:"google.workspace.chat.message.v1.created")
The following queries are invalid:
startTime="2023-08-23T19:20:33+00:00" OR
endTime="2023-08-23T19:21:54+00:00"
eventTypes:"google.workspace.chat.space.v1.updated" AND
eventTypes:"google.workspace.chat.message.v1.created"
Invalid queries are rejected by the server with an INVALID_ARGUMENT error.
Request body
The request body must be empty.
Response body
Response message for listing space events.
If successful, the response body contains data with the following structure:
Results are returned in chronological order (oldest event first). Note: The permissionSettings field is not returned in the Space object for list requests.
nextPageToken
string
Continuation token used to fetch more events. If this field is omitted, there are no subsequent pages.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-22 UTC."],[[["Lists events from a specified Google Chat space, including new members, messages, and reactions, with the payload containing the most recent version of the resource."],["Requires user authentication and membership in the space to list events, returning data chronologically with optional pagination."],["Allows filtering by event types, start time, and end time to refine the results of the listed events."],["The response includes an array of space events and a token for retrieving subsequent pages if available."],["Needs specific authorization scopes for accessing and retrieving the chat space data."]]],["This documentation outlines how to list events from a Google Chat space using the `GET` method. Key actions include: specifying the space via the `parent` path parameter, filtering events by type and time using the `filter` query parameter, and setting the number of events returned with `pageSize`. `pageToken` is used for pagination. Authentication requires user membership in the space and specific OAuth scopes. The response body includes a list of `spaceEvents` and a `nextPageToken` for further results.\n"]]