Hanzo
OpenapiIntegrations

Lists the GitHub accounts the caller may see the App installed on, each…

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/integrations/github/installations

Addresshttps://api.hanzo.ai/v1/integrations/github/installations
MethodGET
Operationget_integrations_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/integrations/github/installations takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200githubInstallationsOutok

200 body — 7 fields.

FieldInTypeAlwaysDescription
installUrlbodystringInstallURL 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.
installationsbodygithubInstallationView[]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[].connectedbodybooleanConnected reports whether THIS org has already bound this account.
installations[].grantbodystringGrant is "all" or "selected" — how many of the account's repositories the install covers.
installations[].htmlUrlbodystringHTMLURL is the account's page on GitHub.
installations[].loginbodystringLogin is the GitHub account name — the org or user the App is installed on.
installations[].typebodystringType is "Organization" or "User".

Failure carries the platform error shape — see Errors.

Examples

hanzo integrations github installations

Integrations API · All Hanzo APIs · Interactive reference

How is this guide?

On this page