Requires either the chat.admin.spaces.readonly or chat.admin.spacesOAuth 2.0 scope.
This method currently only supports admin access, thus only true is accepted for this field.
pageSize
integer
The maximum number of spaces to return. The service may return fewer than this value.
If unspecified, at most 100 spaces are returned.
The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000.
pageToken
string
A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page.
When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
query
string
Required. A search query.
You can search by using the following parameters:
createTime
customer
displayName
externalUserAllowed
lastActiveTime
spaceHistoryState
spaceType
createTime and lastActiveTime accept a timestamp in RFC-3339 format and the supported comparison operators are: =, <, >, <=, >=.
customer is required and is used to indicate which customer to fetch spaces from. customers/my_customer is the only supported value.
displayName only accepts the HAS (:) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's displayName. For example, Fun Eve matches Fun event or The
evening was fun, but not notFun event or even.
externalUserAllowed accepts either true or false.
spaceHistoryState only accepts values from the historyState field of a space resource.
spaceType is required and the only valid value is SPACE.
Across different fields, only AND operators are supported. A valid example is spaceType = "SPACE" AND displayName:"Hello" and an invalid example is spaceType = "SPACE" OR displayName:"Hello".
Among the same field, spaceType doesn't support AND or OR operators. displayName, 'spaceHistoryState', and 'externalUserAllowed' only support OR operators. lastActiveTime and createTime support both AND and OR operators. AND can only be used to represent an interval, such as lastActiveTime
< "2022-01-01T00:00:00+00:00" AND lastActiveTime >
"2023-01-01T00:00:00+00:00".
The following example queries are valid:
customer = "customers/my_customer" AND spaceType = "SPACE"
customer = "customers/my_customer" AND spaceType = "SPACE" AND
displayName:"Hello World"
customer = "customers/my_customer" AND spaceType = "SPACE" AND
(lastActiveTime < "2020-01-01T00:00:00+00:00" OR lastActiveTime >
"2022-01-01T00:00:00+00:00")
customer = "customers/my_customer" AND spaceType = "SPACE" AND
(displayName:"Hello World" OR displayName:"Fun event") AND
(lastActiveTime > "2020-01-01T00:00:00+00:00" AND lastActiveTime <
"2022-01-01T00:00:00+00:00")
customer = "customers/my_customer" AND spaceType = "SPACE" AND
(createTime > "2019-01-01T00:00:00+00:00" AND createTime <
"2020-01-01T00:00:00+00:00") AND (externalUserAllowed = "true") AND
(spaceHistoryState = "HISTORY_ON" OR spaceHistoryState = "HISTORY_OFF")
orderBy
string
Optional. How the list of spaces is ordered.
Supported attributes to order by are:
membershipCount.joined_direct_human_user_count — Denotes the count of human users that have directly joined a space.
lastActiveTime — Denotes the time when last eligible item is added to any topic of this space.
createTime — Denotes the time of the space creation.
[[["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."],[[["Returns a paginated list of Google Workspace spaces based on an administrator's search criteria, including parameters like displayName, createTime, and spaceType."],["Requires administrator privileges and the `useAdminAccess` parameter set to `true` in the request."],["Utilizes the `GET https://chat.googleapis.com/v1/spaces:search` HTTP request with query parameters for customization."],["Needs authorization with either the `chat.admin.spaces` or `chat.admin.spaces.readonly` OAuth scope."],["Response body includes an array of spaces, a token for pagination, and an estimate of the total number of matching spaces."]]],[]]