Method: organizations.search

Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results.

Search will only return organizations on which the user has the permission resourcemanager.organizations.get

HTTP request

POST https://cloudresourcemanager.googleapis.com/v1/organizations:search

The URL uses Google API HTTP annotation syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "pageSize": number,
  "pageToken": string,
  "filter": string
}
Fields
pageSize

number

The maximum number of Organizations to return in the response. This field is optional.

pageToken

string

A pagination token returned from a previous call to organizations.search that indicates from where listing should continue. This field is optional.

filter

string

An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive.

Organizations may be filtered by owner.directoryCustomerId or by domain, where the domain is a G Suite domain, for example:

Filter Description
owner.directorycustomerid:123456789 Organizations with
owner.directory_customer_id equal to 123456789.
domain:google.com Organizations corresponding to the domain google.com.

This field is optional.

Response body

If successful, the response body contains data with the following structure:

The response returned from the organizations.search method.

JSON representation
{
  "organizations": [
    {
      object(Organization)
    }
  ],
  "nextPageToken": string
}
Fields
organizations[]

object(Organization)

The list of Organizations that matched the search query, possibly paginated.

nextPageToken

string

A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/cloudplatformorganizations
  • https://www.googleapis.com/auth/cloudplatformorganizations.readonly

For more information, see the Authentication Overview.

Was this page helpful? Let us know how we did:

Send feedback about...

Resource Manager