API

ArtefactRevision

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/{organization_id}/artefacts/{artefact_ref}/revisions create Revision published

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:

created, err := client.ArtefactRevision(nil).Create(map[string]any{"artefact_id": "example", "organization_id": "example", "base_version": 1, "content": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local created, err = client:ArtefactRevision():create({ artefact_id = "example", organization_id = "example", base_version = 1, content = "example" })

PHP

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

$created = $client->ArtefactRevision()->create(["artefact_id" => "example", "organization_id" => "example", "base_version" => 1, "content" => "example"]);

Python

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

created = client.ArtefactRevision().create({ "artefact_id": "example", "organization_id": "example", "base_version": 1, "content": "example" })

Ruby

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

created = client.ArtefactRevision.create({ "artefact_id" => "example", "organization_id" => "example", "base_version" => 1, "content" => "example" })

TypeScript

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

const created = await client.ArtefactRevision().create({ artefact_id: "example", organization_id: "example", base_version: 1, content: "example" })

Fields

Field Type Required Description
base_version integer Yes The newest version the editor started from.
content string Yes Markdown, including CriticMarkup suggestions and comment anchors.

create

POST /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/revisions

Operation ID: revisions_api_v1_organization_artefact.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
artefact_ref path string Yes

Request body

application/json

Property Type Required Description
base_version integer Yes The newest version the editor started from.
content string Yes Markdown, including CriticMarkup suggestions and comment anchors.

Responses

201: Revision published

application/json

Property Type Required Description
artefact object Yes
artefact.automation_invocation_id string No
artefact.byte_size integer Yes
artefact.checksum_sha256 string Yes
artefact.content_type string Yes
artefact.created_at string No
artefact.created_by_user_id string No
artefact.description string No
artefact.document_key string No Stable document identity shared by all revisions.
artefact.entrypoint string No
artefact.expires_at string No
artefact.filename string Yes
artefact.files array of object No
artefact.files[].byte_size integer Yes
artefact.files[].checksum_sha256 string Yes
artefact.files[].content_type string Yes
artefact.files[].path string Yes
artefact.files[].version_id string No
artefact.harness string No
artefact.harness_version string No
artefact.id string Yes
artefact.kind string Yes
artefact.model string No
artefact.organization_id string Yes
artefact.published_at string No
artefact.repository_id string No
artefact.slug string Yes
artefact.source string Yes
artefact.status string Yes
artefact.title string Yes
artefact.vcs_agent_checkpoint_id string No
artefact.vcs_agent_session_id string No
artefact.version integer Yes
artefact.view_url string (uri) Yes
artefact.web_url string (uri) Yes
404: Not found
409: A newer version was saved first

application/json

Property Type Required Description
error string Yes
latest_version integer Yes
422: Not an editable Markdown document, or invalid content