# Method: projects.locations.spaces.list

- [HTTP request](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.request_body)
- [Response body](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.ListSpacesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces/list#try-it)

Lists spaces in a given project and location.

### HTTP request

`GET https://designcenter.googleapis.com/v1alpha/{parent=projects/*/locations/*}/spaces`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the parent resource, for which spaces are listed. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The maximum number of pages to return from this request. If unspecified, the value automatically reflects the number of results returned. |
| `pageToken` | `string` Optional. If present, retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. |
| `filter` | `string` Optional. A filter that chooses which spaces to return. |
| `orderBy` | `string` Optional. How the results are sorted. |

### Request body

The request body must be empty.

### Response body

Results returned from projects.locations.spaces.list.

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

| JSON representation |
|---|
| ``` { "spaces": [ { object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces#Space`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `spaces[]` | ``object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1alpha/projects.locations.spaces#Space`)`` A list of spaces. |
| `nextPageToken` | `string` If there might be more results than those appearing in this response, nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken. |
| `unreachable[]` | `string` Unordered list. 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).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `designcenter.spaces.list`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).