# Method: projects.locations.connections.repositories.list

- [HTTP request](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.request_body)
- [Response body](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.ListRepositoriesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories/list#try-it)

Lists Repositories in a given connection.

### HTTP request

`GET https://cloudbuild.googleapis.com/v2/{parent=projects/*/locations/*/connections/*}/repositories`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent, which owns this collection of Repositories. Format: `projects/*/locations/*/connections/*`. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Number of results to return in the list. |
| `pageToken` | `string` Page start. |
| `filter` | `string` A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. `remoteUri:"https://github.com*"`. |

### Request body

The request body must be empty.

### Response body

Message for response to listing Repositories.

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

| JSON representation |
|---|
| ``` { "repositories": [ { object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `repositories[]` | ``object (`https://docs.cloud.google.com/build/docs/api/reference/rest/v2/projects.locations.connections.repositories#Repository`)`` The list of Repositories. |
| `nextPageToken` | `string` A token identifying a page of results the server should return. |

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

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

- `cloudbuild.repositories.list`

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