Method: projects.groups.list

Lists the existing groups.

HTTP request

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

Path parameters

Parameters
name

string

The project whose groups are to be listed. The format is "projects/{project_id_or_number}".

Query parameters

Parameters
pageSize

number

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: "projects/{project_id_or_number}/groups/{groupId}". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.

ancestorsOfGroup

string

A group name: "projects/{project_id_or_number}/groups/{groupId}". 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: "projects/{project_id_or_number}/groups/{groupId}". 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

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

The groups.list response.

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

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 Auth Guide.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Stackdriver Monitoring