# Method: projects.locations.connections.fetchLinkableGitRepositories

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

connections.fetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

### HTTP request

`GET https://developerconnect.googleapis.com/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories`

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

### Path parameters

| Parameters ||
|---|---|
| `connection` | `string` Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Number of results to return in the list. Defaults to 20. |
| `pageToken` | `string` Optional. Page start. |

### Request body

The request body must be empty.

### Response body

Response message for connections.fetchLinkableGitRepositories.

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

| JSON representation |
|---|
| ``` { "linkableGitRepositories": [ { object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections/fetchLinkableGitRepositories#LinkableGitRepository`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `linkableGitRepositories[]` | ``object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections/fetchLinkableGitRepositories#LinkableGitRepository`)`` The git repositories that can be linked to the connection. |
| `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://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

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

- `developerconnect.connections.fetchLinkableGitRepositories`

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

## LinkableGitRepository

LinkableGitRepository represents a git repository that can be linked to a connection.

| JSON representation |
|---|
| ``` { "cloneUri": string } ``` |

| Fields ||
|---|---|
| `cloneUri` | `string` The clone uri of the repository. |