# Method: projects.locations.bareMetalClusters.list

- [HTTP request](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.request_body)
- [Response body](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.ListBareMetalClustersResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#body.aspect)
- [ClusterView](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#ClusterView)

Lists bare metal clusters in a given project and location.

### HTTP request

`GET https://gkeonprem.googleapis.com/v1/{parent=projects/*/locations/*}/bareMetalClusters`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent of the project and location where the clusters are listed in. Format: "projects/{project}/locations/{location}" |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Requested page size. Server may return fewer items than requested. If unspecified, at most 50 clusters will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` A token identifying a page of results the server should return. |
| `filter` | `string` A resource filtering expression following <https://google.aip.dev/160>. When non-empty, only resource's whose attributes field matches the filter are returned. |
| `view` | ``enum (`https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters/list#ClusterView`)`` View for bare metal Clusters. When `BASIC` is specified, only the cluster resource name and admin cluster membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as \`FULL', which returns the complete cluster configuration details. |
| `allowMissing` | `boolean` Optional. If true, return list of BareMetal Clusters including the ones that only exists in RMS. |

### Request body

The request body must be empty.

### Response body

Response message for listing bare metal Clusters.

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

| JSON representation |
|---|
| ``` { "bareMetalClusters": [ { object (`https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters#BareMetalCluster`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `bareMetalClusters[]` | ``object (`https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters#BareMetalCluster`)`` The list of bare metal Clusters. |
| `nextPageToken` | `string` A token identifying a page of results the server should return. If the token is not empty this means that more results are available and should be retrieved by repeating the request with the provided page token. |
| `unreachable[]` | `string` Locations that could not be reached. |

### Authorization scopes

Requires the following OAuth scope:

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

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

## ClusterView

A view for cluster resources.

| Enums ||
|---|---|
| `CLUSTER_VIEW_UNSPECIFIED` | If the value is not set, the default `FULL` view is used. |
| `BASIC` | Includes basic information of a cluster resource including cluster resource name and admin cluster membership. |
| `FULL` | Includes the complete configuration for bare metal cluster resource. This is the default value for ListBareMetalClustersRequest method. |