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 | |
---|---|
use |
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 |
page |
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. |
page |
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:
|
order |
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. |
next |
A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. |
total |
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.