Returns a list of spaces in a Google Workspace organization based on an administrator's search.
Requires user authentication with administrator privileges. In the request, set useAdminAccess
to true
.
HTTP request
GET https://chat.googleapis.com/v1/spaces:search
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
useAdminAccess |
When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires either the This method currently only supports admin access, thus only |
pageSize |
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 |
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 |
Required. A search query. You can search by using the following parameters:
Across different fields, only Among the same field, The following example queries are valid:
|
orderBy |
Optional. How the list of spaces is ordered. Supported attributes to order by are:
Valid ordering operation values are:
The supported syntax are:
|
Request body
The request body must be empty.
Response body
Response with a list of spaces corresponding to the search spaces request.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"spaces": [
{
object ( |
Fields | |
---|---|
spaces[] |
A page of the requested spaces. |
nextPageToken |
A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. |
totalSize |
The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/chat.admin.spaces
https://www.googleapis.com/auth/chat.admin.spaces.readonly
For more information, see the Authorization guide.