Hanzo
OpenapiGit

Walks a ref's history newest first, or one path's history when a path is given.

Walks a ref's history newest first, or one path's history when a path is given.

GET /v1/git/repos/{name}/commits

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

Walks a ref's history newest first, or one path's history when a path is given. There is no cursor: the page is the newest limit commits.

Request

4 fields.

FieldInTypeRequiredDescription
namepathstringyesName is the repo to read, from the :name path segment.
refquerystringRef is the branch, tag or commit to walk back from; empty means HEAD.
pathquerystringPath narrows the history to commits touching it; empty walks the whole ref.
limitqueryintegerLimit caps the page.

Response

StatusBodyMeaning
200commitsJSONok

200 body — 7 fields.

FieldInTypeAlwaysDescription
commitsbodycommitJSON[]Commits are newest first.
commits[].authorEmailbodystringAuthorEmail is the commit author's email.
commits[].authorNamebodystringAuthorName is the commit author's name.
commits[].datebodystringDate is the author date, RFC 3339 UTC.
commits[].messagebodystringMessage is the commit's SUBJECT — its first line only.
commits[].shabodystringSHA is the full commit hash.
commits[].shortShabodystringShortSHA is the abbreviated hash a UI displays.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos commits <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page