Hanzo
OpenapiGit

Flips a repo's public bit, the one mutable repo setting today.

Flips a repo's public bit, the one mutable repo setting today. Public grants ANONYMOUS fetch only; push and the whole control plane stay org-authed.

PATCH /v1/git/repos/{name}

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

Flips a repo's public bit, the one mutable repo setting today. Public grants ANONYMOUS fetch only; push and the whole control plane stay org-authed. Returns the updated repo.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyesName is the repo to update, from the :name path segment.
namebodystringName is the repo to update, from the :name path segment.
publicbodybooleanPublic flips anonymous read access.

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 update <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page