Hanzo AI
OpenapiGit

Create runs

Runs a repository's workflows at a ref, on demand.

POST /v1/git/runs

Addresshttps://api.hanzo.ai/v1/git/runs
MethodPOST
Operationpost_git_runs
AuthAuthorization: Bearer $HANZO_API_KEY

Runs a repository's workflows at a ref, on demand.

It takes the SAME path a push takes: the request is recorded in the journal and delivered from there, so an explicit run and a pushed one are one mechanism with one idempotency rule and not two that can disagree. Asking twice for the same commit yields the same run.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
refbodystringRef is the branch to run; empty means the repository's default.
repobodystringRepo is the repository to run.

Response

StatusBodyMeaning
201git.workflowRunscreated
defaultproblem-detailsrefused

201 body — 12 fields.

FieldInTypeAlwaysDescription
databodygit.workflowRun[]Data is the runs in scope, newest first.
data[].actorbodystringActor is who caused it.
data[].commitbodystringCommit is the commit being run, in full.
data[].createdAtbodyinteger (int64)CreatedAt is when the run was opened, in unix seconds.
data[].eventbodystringEvent is what caused the run, e.g.
data[].idbodystringID addresses this run.
data[].numberbodyinteger (int64)Number is the run's position in its repository, counting from 1 — the handle a person uses ("#4").
data[].refbodystringRef is the full ref, e.g.
data[].repobodystringRepo is the repository the run is for.
data[].statusbodystringStatus is waiting, running, success, failure, cancelled or skipped.
data[].updatedAtbodyinteger (int64)UpdatedAt is when its status last changed, in unix seconds.
data[].workflowbodystringWorkflow is the path of the document being run, e.g.

Failure carries the platform error shape — see Errors.

Examples

hanzo git runs create

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page