Method: projects.groups.list

Lists the existing groups.

HTTP request

GET https://monitoring.googleapis.com/v3/{name}/groups

Path parameters

Parameters
name

string

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

Query parameters

Parameters
pageSize

integer

A positive number that is the maximum number of results to return.

pageToken

string

If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

Union parameter filter. An optional filter consisting of a single group name. The filters limit the groups returned based on their parent-child relationship with the specified group. If no filter is specified, all groups are returned. filter can be only one of the following:
childrenOfGroup

string

A group name. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.

ancestorsOfGroup

string

A group name. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.

descendantsOfGroup

string

A group name. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of-children, and so forth.

Request body

The request body must be empty.

Response body

The groups.list response.

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

JSON representation
{
  "group": [
    {
      object (Group)
    }
  ],
  "nextPageToken": string
}
Fields
group[]

object (Group)

The groups that match the specified filters.

nextPageToken

string

If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/monitoring
  • https://www.googleapis.com/auth/monitoring.read

For more information, see the Authentication Overview.