# List installations

URL: https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-installations

> Lists the GitHub accounts the caller may see the App installed on, each confirmed against the App's own list, plus where to add another.

`GET /v1/provider/github/installations`

> [Provider →](https://docs.hanzo.ai/docs/openapi/provider) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                         |
| ------------- | ------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/provider/github/installations` |
| **Method**    | `GET`                                                   |
| **Operation** | `get_provider_github_installations`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                  |

Lists the GitHub accounts the caller may see the App
installed on, each confirmed against the App's own list, plus where to add
another.

The confirmation is the point. A connection row holds an installation id, and
an id whose installation was since removed on GitHub is a row that mints
nothing — every list and import against it fails with a token error, which
reads as "our git integration is broken" rather than "that install is gone".
Checking the App's view turns that into a fact the caller can act on.

ORG-SCOPED for a tenant, deliberately. The App is installed across every
customer, so the raw list is the customer list; a tenant sees only accounts its
own org has bound. It discovers a NEW account by installing it (InstallURL),
which is GitHub's own consent screen — not by reading ours.

A SUPER ADMIN sees the App's whole install list, because that list is the
platform's own inventory rather than any one tenant's data, and platform sudo
is the single cross-tenant scope this house has. Without it an App installed
out-of-band — granted straight from GitHub, so no connect flow ever ran and no
connection row exists — is invisible to everyone: the console card reads "not
connected" and an operator asked "which GitHub orgs do you see" can only
answer for accounts already bound, which is precisely the accounts that were
never the question.

## Request

`GET /v1/provider/github/installations` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body                            | Meaning |
| --------- | ------------------------------- | ------- |
| `200`     | provider.githubInstallationsOut | ok      |
| `default` | problem-details                 | refused |

`200` body — 7 fields.

| Field                       | In   | Type                               | Always | Description                                                                                                                                        |
| --------------------------- | ---- | ---------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `installUrl`                | body | string                             | —      | InstallURL is where to grant a new account, so a UI with an empty list has somewhere to send the reader instead of a dead end.                     |
| `installations`             | body | provider.githubInstallationView\[] | —      | Installations is every account the caller may see: the ones its own org has bound, or — for a super admin — every account the App is installed on. |
| `installations[].connected` | body | boolean                            | —      | Connected reports whether THIS org has already bound this account.                                                                                 |
| `installations[].grant`     | body | string                             | —      | Grant is "all" or "selected" — how many of the account's repositories the install covers.                                                          |
| `installations[].htmlUrl`   | body | string                             | —      | HTMLURL is the account's page on GitHub.                                                                                                           |
| `installations[].login`     | body | string                             | —      | Login is the GitHub account name — the org or user the App is installed on.                                                                        |
| `installations[].type`      | body | string                             | —      | Type is "Organization" or "User".                                                                                                                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo provider github installations
```

**SDK**

**.ts**

```ts
import { Configuration, ProviderApi } from 'hanzoai';

const api = new ProviderApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProviderGithubInstallations();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProviderApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProviderApi(client).get_provider_github_installations()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ProviderAPI.GetProviderGithubInstallations(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, provider_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = provider_api::get_provider_github_installations(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProviderApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ProviderApi(client).getProviderGithubInstallations();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/provider/github/installations \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **provider** through the `provider` tool, which names its 38 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_connections"
         }
       }
     }'
```

---

[Provider API](https://docs.hanzo.ai/docs/openapi/provider) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
