Hanzo
OpenapiGit

Returns one repo with its live ref state: every branch name and the resolved…

Returns one repo with its live ref state: every branch name and the resolved HEAD commit.

GET /v1/git/repos/{name}

Addresshttps://api.hanzo.ai/v1/git/repos/{name}
MethodGET
Operationget_git_repos_by_name
AuthAuthorization: Bearer $HANZO_API_KEY

Returns one repo with its live ref state: every branch name and the resolved HEAD commit. Both are read from the object store on each call, so an empty repo reports no branches and an empty head rather than failing. A repo outside the caller's scope is not found.

Request

1 field.

FieldInTypeRequiredDescription
namepathstringyesName is the repo's org-unique handle, from the :name path segment.

Response

StatusBodyMeaning
200repoViewok

200 body — 14 fields.

FieldInTypeAlwaysDescription
branchesbodystring[]Branches are the repo's branch names.
cloneUrlbodystringCloneURL is the HTTPS smart-HTTP remote git clone takes.
createdAtbodystringCreatedAt is RFC 3339 UTC.
defaultBranchbodystringDefaultBranch is where HEAD points on a fresh repo ("main").
descriptionbodystringDescription is the caller-supplied blurb (max 4KiB).
headbodystringHead is the resolved HEAD commit, empty on an empty repo.
idbodystringID is the repo's stable, prefixed identifier ("repo_" + 128 random bits).
namebodystringName is the org-unique handle, and the last path segment of both URLs below.
orgbodystringOrg owns the repo — the gateway-minted X-Org-Id, and the isolation key.
projectbodystringProject is the optional sub-scope the repo lives in; absent for the org's default scope.
publicbodybooleanPublic grants ANONYMOUS read (fetch) only; push and the whole control plane stay org-authed.
sizeBytesbodyintegerSizeBytes is the repo's measured on-disk size, re-measured on create, after each push, and after a gc.
sshUrlbodystringSSHURL is the scp-style SSH remote (git@host:org/repo.git).
updatedAtbodystringUpdatedAt is RFC 3339 UTC, empty until the first write.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos get <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page