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

Addresshttps://api.hanzo.ai/v1/provider/github/installations
MethodGET
Operationget_provider_github_installations
AuthAuthorization: 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

StatusBodyMeaning
200provider.githubInstallationsOutok
defaultproblem-detailsrefused

200 body — 7 fields.

FieldInTypeAlwaysDescription
installUrlbodystring—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.
installationsbodyprovider.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[].connectedbodyboolean—Connected reports whether THIS org has already bound this account.
installations[].grantbodystring—Grant is "all" or "selected" — how many of the account's repositories the install covers.
installations[].htmlUrlbodystring—HTMLURL is the account's page on GitHub.
installations[].loginbodystring—Login is the GitHub account name — the org or user the App is installed on.
installations[].typebodystring—Type is "Organization" or "User".

Failure carries the platform error shape — see Errors.

Examples

hanzo provider github installations
import { 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();
curl https://api.hanzo.ai/v1/provider/github/installations \
  -H "Authorization: Bearer $HANZO_API_KEY"

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:

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 · All Hanzo APIs · Interactive reference

Was this page useful?