Hanzo
OpenapiIntegrations

Imports the selected (or all) granted repos into git.hanzo.ai.

Imports the selected (or all) granted repos into git.hanzo.ai.

POST /v1/integrations/github/repos/import

Addresshttps://api.hanzo.ai/v1/integrations/github/repos/import
MethodPOST
Operationpost_integrations_github_repos_import
AuthAuthorization: Bearer $HANZO_API_KEY

Imports the selected (or all) granted repos into git.hanzo.ai. The selection is intersected with the installation's GRANTED set, so a client can never import a repo the App was not granted (org isolation + a grant check). The import runs in a bounded background worker (don't block the request), so the answer is 202 Accepted; poll GET /v1/integrations/github/repos for the per-repo status to flip to imported.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
allbodybooleanAll imports every repository the installation grants, instead of naming them.
reposbodystring[]Repos names the repositories to import, either owner-qualified ("hanzo-apps/ai") or as a bare name ("ai"); a trailing ".git" is stripped.

Response

StatusBodyMeaning
202githubImportOutaccepted

202 body — 2 fields.

FieldInTypeAlwaysDescription
queuedbodyintegerQueued is how many repositories were handed to the background importer.
reposbodystring[]Repos names those repositories, in the installation's listing order.

Failure carries the platform error shape — see Errors.

Examples

hanzo integrations github repos import

Integrations API · All Hanzo APIs · Interactive reference

How is this guide?

On this page