API

ChangeGitPublication

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/git_publications create Success
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/git_publications/{id} load Original Git objects, Change identities, exact parents, and target verified

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

change_git_publication, err := client.ChangeGitPublication(nil).Load(map[string]any{"id": "example_id", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(change_git_publication)
created, err := client.ChangeGitPublication(nil).Create(map[string]any{"organization_id": "example", "repo_id": "example", "operation_key": "example", "request": map[string]any{}}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local change_git_publication, err = client:ChangeGitPublication():load({ id = "example_id", organization_id = "example", repo_id = "example" })
local created, err = client:ChangeGitPublication():create({ organization_id = "example", repo_id = "example", operation_key = "example", request = {} })

PHP

Construct client as shown in the PHP setup, then call the operations:

$change_git_publication = $client->ChangeGitPublication()->load(["id" => "example_id", "organization_id" => "example", "repo_id" => "example"]);
$created = $client->ChangeGitPublication()->create(["organization_id" => "example", "repo_id" => "example", "operation_key" => "example", "request" => []]);

Python

Construct client as shown in the Python setup, then call the operations:

change_git_publication = client.ChangeGitPublication().load({"id": "example_id", "organization_id": "example", "repo_id": "example"})
created = client.ChangeGitPublication().create({ "organization_id": "example", "repo_id": "example", "operation_key": "example", "request": {} })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

change_git_publication = client.ChangeGitPublication.load({ "id" => "example_id", "organization_id" => "example", "repo_id" => "example" })
created = client.ChangeGitPublication.create({ "organization_id" => "example", "repo_id" => "example", "operation_key" => "example", "request" => {} })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const change_git_publication = await client.ChangeGitPublication().load({ id: "example_id", organization_id: "example", repo_id: "example" })
const created = await client.ChangeGitPublication().create({ organization_id: "example", repo_id: "example", operation_key: "example", request: {} })

Fields

Field Type Required Description
expected_target_commit_id string Yes Expected Target Commit Id
id string No Id
operation_key string Yes Operation Key
publication_id string Yes Publication Id
request object Yes Request
request_digest string Yes Request Digest
revisions array Yes Revisions
status string Yes Status
transfer_refs array No Immutable receipt-owned refs returned by preparation; transfer each exact Git target before polling readiness.

create

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/git_publications

Operation ID: api_v1_git_publications.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

Property Type Required Description
operation_key string Yes
request object Yes
request.expected_target_git_id string Yes
request.revisions array of object Yes
request.revisions[].change_id string Yes
request.revisions[].expected_head_commit_id string No Observed original Git head of the existing review. Required together with expected_patchset_number when amending.
request.revisions[].expected_patchset_number integer No
request.revisions[].git_commit_id string Yes
request.revisions[].git_parent_ids array of string Yes
request.target_branch string Yes

Responses

200: Success

application/json

The response is object.

201: Receipt prepared or identical retry acknowledged; object readiness is checked separately

application/json

Property Type Required Description
publication_id string Yes
request_digest string Yes
status enum: awaiting_objects, objects_ready Yes
transfer_refs array of object No Immutable receipt-owned refs returned by preparation; transfer each exact Git target before polling readiness.
transfer_refs[].name string Yes
transfer_refs[].new string Yes
transfer_refs[].old string Yes
401: Unauthorized
403: Forbidden
404: Not found
409: Operation key reused with a different graph
422: Invalid graph or unsupported repository scope
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/git_publications/{id}

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_git_publications_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Responses

200: Original Git objects, Change identities, exact parents, and target verified

application/json

The response is object and object.

202: Receipt-owned immutable Git anchors are awaiting durable publication
401: Unauthorized
403: Forbidden
404: Receipt unavailable in this repository or for this author
409: Git target moved since receipt preparation; refresh before retrying
422: Git identity
502: Bad gateway