Skip to content

gitpublish module route (requires gitpublish:push:write)

POST
/v1/m/gitpublish/targets/{id}/pushes
curl --request POST \
--url https://example.com/v1/m/gitpublish/targets/example/pushes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "acknowledge_intent": "example", "commit": "example", "expected_old": "example", "operation_id": "example", "ref": "example", "session_run": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tree": "example" }'

Pushes one exact commit to a branch under the target’s push prefix, leased on the branch’s expected current value, and returns the publication intent with its receipt.

id
required
string

Path parameter id.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

The handler decodes one strict JSON document, bounded at 1 MiB; an unknown field is field_not_accepted.

Media type application/json
object
acknowledge_intent

Names an abandoned intent of the same scope this request knowingly proceeds past; requires target admin at AAL3.

string
commit
required

The exact commit.

string
/^[0-9a-f]{40}([0-9a-f]{24})?$/
expected_old

The lease: the ref’s expected current value; empty requires the ref to be absent.

string
operation_id
required

Client idempotency key.

string
/^[A-Za-z0-9._:-]{1,128}$/
ref
required

A branch under push_prefix. A merge base, the host’s default branch and any branch the host reports as protected are refused; tags are refused.

string
/^refs/heads/[A-Za-z0-9._/-]+$/
session_run

A session run in the target’s workspace whose folder holds the commit; the engine fetches the commit from it into the server repository first. Never a path.

string format: uuid
tree
required

The commit’s tree, checked in the server repository.

string
/^[0-9a-f]{40}([0-9a-f]{24})?$/
Example generated
{
"acknowledge_intent": "example",
"commit": "example",
"expected_old": "example",
"operation_id": "example",
"ref": "example",
"session_run": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"tree": "example"
}

OK

Media type application/json
object
Example generated
{}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Conflict / setup required

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}