List 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
| 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.
Examples
hanzo provider github installationsimport { Configuration, ProviderApi } from 'hanzoai';
const api = new ProviderApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProviderGithubInstallations();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()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
}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?;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();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/provider/github/installations \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for provider — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?