displayName 仅接受 HAS (:) 运算符。要匹配的文本首先会被词元化为词元,然后每个词元都会以不区分大小写的方式独立进行前缀匹配,作为displayName中任意位置的子字符串。例如,Fun Eve 与 Fun event 或 The
evening was fun 匹配,但不与 notFun event 或 even 匹配。
externalUserAllowed 接受 true 或 false。
spaceHistoryState 仅接受 space 资源的 historyState 字段中的值。
spaceType 是必需的,唯一的有效值为 SPACE。
在不同字段之间,仅支持 AND 运算符。有效示例为 spaceType = "SPACE" AND displayName:"Hello",无效示例为 spaceType = "SPACE" OR displayName:"Hello"。
在同一字段中,spaceType 不支持 AND 或 OR 运算符。displayName、'spaceHistoryState' 和 'externalUserAllowed' 仅支持 OR 运算符。lastActiveTime 和 createTime 同时支持 AND 和 OR 运算符。AND 只能用于表示时间段,例如 lastActiveTime
< "2022-01-01T00:00:00+00:00" AND lastActiveTime >
"2023-01-01T00:00:00+00:00"。
以下示例查询有效:
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")
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eReturns a paginated list of Google Workspace spaces based on an administrator's search criteria, including parameters like displayName, createTime, and spaceType.\u003c/p\u003e\n"],["\u003cp\u003eRequires administrator privileges and the \u003ccode\u003euseAdminAccess\u003c/code\u003e parameter set to \u003ccode\u003etrue\u003c/code\u003e in the request.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003eGET https://chat.googleapis.com/v1/spaces:search\u003c/code\u003e HTTP request with query parameters for customization.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with either the \u003ccode\u003echat.admin.spaces\u003c/code\u003e or \u003ccode\u003echat.admin.spaces.readonly\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"],["\u003cp\u003eResponse body includes an array of spaces, a token for pagination, and an estimate of the total number of matching spaces.\u003c/p\u003e\n"]]],["To search for Google Workspace spaces, send a `GET` request to `https://chat.googleapis.com/v1/spaces:search`, ensuring admin privileges and setting `useAdminAccess` to `true`. Define the search using query parameters, including a required `query` to filter spaces (by `customer`, `displayName`, etc.), optional `pageSize` and `pageToken` for pagination, and optional `orderBy` for sorting. You must have one of the authorization scopes: `chat.admin.spaces` or `chat.admin.spaces.readonly`. The response will list spaces matching the query.\n"],null,[]]