# Method: projects.locations.connections.fetchGitHubInstallations

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

connections.fetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

### HTTP request

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

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

### Path parameters

| Parameters ||
|---|---|
| `connection` | `string` Required. The resource name of the connection in the format `projects/*/locations/*/connections/*`. |

### Request body

The request body must be empty.

### Response body

Response of fetching github installations.

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

| JSON representation |
|---|
| ``` { "installations": [ { object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections/fetchGitHubInstallations#Installation`) } ] } ``` |

| Fields ||
|---|---|
| `installations[]` | ``object (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections/fetchGitHubInstallations#Installation`)`` List of installations available to the OAuth user (for github.com) or all the installations (for GitHub enterprise). |

### 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.fetchGitHubInstallations`

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

## Installation

Represents an installation of the GitHub App.

| JSON representation |
|---|
| ``` { "id": string, "name": string, "type": string } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` ID of the installation in GitHub. |
| `name` | `string` Name of the GitHub user or organization that owns this installation. |
| `type` | `string` Either "user" or "organization". |