- [HTTP request](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.request_body)
- [Response body](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.ListServiceGroupsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#body.aspect)
- [GroupStateView](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupStateView)
- [GroupState](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupState)
  - [JSON representation](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupState.SCHEMA_REPRESENTATION)
- [Group](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#Group)
  - [JSON representation](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#Group.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#try-it)

List service groups owned by the given service.

### HTTP request

`GET https://serviceusage.googleapis.com/v2beta/{parent=*/*/services/*}/groups`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent service state that exposes the group states. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` A page token, received from a previous `groups.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `groups.list` must match the call that provided the page token. |
| `view` | ``enum (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupStateView`)`` The view of the group state to use. |

### Request body

The request body must be empty.

### Response body

The response message of the `groups.list` method.

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

| JSON representation |
|---|
| ``` { "groups": [ { object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupState`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `groups[]` | ``object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#GroupState`)`` The group states exposed by the parent service. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform.read-only`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## GroupStateView

The view of the group state.

| Enums ||
|---|---|
| `GROUP_STATE_VIEW_UNSPECIFIED` | The default / unset value. The API will default to the BASIC view. |
| `GROUP_STATE_VIEW_BASIC` | The basic view includes only the group metadata, it does not include information about the current state of the group. This is the default value. |
| `GROUP_STATE_VIEW_FULL` | Include everything. |

## GroupState

Information about the state of a group with respect to a consumer resource.

| JSON representation |
|---|
| ``` { "name": string, "group": { object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#Group`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of the group state. |
| `group` | ``object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/services.groups/list#Group`)`` Output only. The group referenced by this state. |

## Group

Information about the group.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the group. |
| `displayName` | `string` The display name of the group. |
| `description` | `string` The detailed description of the group. |