Artefact
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 |
create |
Success |
GET |
/api/v1/organizations/{organization_id}/artefacts |
list |
Successful response |
GET |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref} |
load |
Successful response |
GET |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/download |
load |
Private attachment |
PATCH |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref} |
patch |
Successful response |
DELETE |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref} |
remove |
Success |
PUT |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref} |
update |
Success |
PUT |
/api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/draft |
update |
Working copy saved |
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:
artefacts, err := client.Artefact(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(artefacts)
artefact, err := client.Artefact(nil).Load(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(artefact)
created, err := client.Artefact(nil).Create(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.Artefact(nil).Update(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.Artefact(nil).Patch(map[string]any{"id": "example_id", "organization_id": "example", "description": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
removed, err := client.Artefact(nil).Remove(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local artefacts, err = client:Artefact():list({ organization_id = "example" })
local artefact, err = client:Artefact():load({ id = "example_id", organization_id = "example" })
local created, err = client:Artefact():create({ organization_id = "example" })
local updated, err = client:Artefact():update({ id = "example_id", organization_id = "example" })
local patched, err = client:Artefact():patch({ id = "example_id", organization_id = "example", description = "example" })
local removed, err = client:Artefact():remove({ id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$artefacts = $client->Artefact()->list(["organization_id" => "example"]);
$artefact = $client->Artefact()->load(["id" => "example_id", "organization_id" => "example"]);
$created = $client->Artefact()->create(["organization_id" => "example"]);
$updated = $client->Artefact()->update(["id" => "example_id", "organization_id" => "example"]);
$patched = $client->Artefact()->patch(["id" => "example_id", "organization_id" => "example", "description" => "example"]);
$client->Artefact()->remove(["id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
artefacts = client.Artefact().list({"organization_id": "example"})
artefact = client.Artefact().load({"id": "example_id", "organization_id": "example"})
created = client.Artefact().create({ "organization_id": "example" })
updated = client.Artefact().update({"id": "example_id", "organization_id": "example"})
patched = client.Artefact().patch({"id": "example_id", "organization_id": "example", "description": "example"})
client.Artefact().remove({"id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
artefacts = client.Artefact.list({ "organization_id" => "example" })
artefact = client.Artefact.load({ "id" => "example_id", "organization_id" => "example" })
created = client.Artefact.create({ "organization_id" => "example" })
updated = client.Artefact.update({ "id" => "example_id", "organization_id" => "example" })
patched = client.Artefact.patch({ "id" => "example_id", "organization_id" => "example", "description" => "example" })
client.Artefact.remove({ "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const artefacts = await client.Artefact().list({ organization_id: "example" })
const artefact = await client.Artefact().load({ id: "example_id", organization_id: "example" })
const created = await client.Artefact().create({ organization_id: "example" })
const updated = await client.Artefact().update({ id: "example_id", organization_id: "example" })
const patched = await client.Artefact().patch({ id: "example_id", organization_id: "example", description: "example" })
await client.Artefact().remove({ id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
automation_invocation_id |
one,string,null |
No | Automation Invocation Id |
byte_size |
integer |
Yes | Byte Size |
checksum_sha256 |
string |
Yes | Checksum Sha256 |
content_type |
string |
Yes | Content Type |
created_at |
one,string,null |
No | Created At |
created_by_user_id |
one,string,null |
No | Created By User Id |
description |
one,string,null |
No | Description |
document_key |
string |
No | Stable document identity shared by all revisions. |
entrypoint |
string |
No | Entrypoint |
expires_at |
one,string,null |
No | Expires At |
filename |
string |
Yes | Filename |
files |
array |
No | Files |
harness |
one,string,null |
No | Harness |
harness_version |
one,string,null |
No | Harness Version |
id |
string |
Yes | Id |
kind |
string |
Yes | Kind |
model |
one,string,null |
No | Model |
organization_id |
string |
Yes | Organization Id |
published_at |
one,string,null |
No | Published At |
repository_id |
one,string,null |
No | Repository Id |
slug |
string |
Yes | Slug |
source |
string |
Yes | Source |
status |
string |
Yes | Status |
title |
string |
Yes | Title |
vcs_agent_checkpoint_id |
one,string,null |
No | Vcs Agent Checkpoint Id |
vcs_agent_session_id |
one,string,null |
No | Vcs Agent Session Id |
version |
integer |
Yes | Version |
view_url |
string |
Yes | View Url |
web_url |
string |
Yes | Web Url |
create
POST /api/v1/organizations/{organization_id}/artefacts
Operation ID: post_api_v1_organizations_organization_id_artefacts.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
The request body is object.
multipart/form-data
| Property | Type | Required | Description |
|---|---|---|---|
description |
string |
No | |
entrypoint |
string |
No | Relative path opened by the viewer. |
file |
string (binary) |
No | |
files |
array of string (binary) |
No | |
harness |
string |
No | |
harness_version |
string |
No | |
kind |
string |
No | |
metadata_json |
object |
No | Allowlisted VcsAgentMetadata provenance; unknown fields are discarded. |
model |
string |
No | |
paths |
string |
No | JSON array of relative paths corresponding to files. |
repository_id |
string |
No | Repository public ID or slug within the publishing organization. |
slug |
string |
No | |
source |
enum: agent, user |
No | |
title |
string |
No | |
vcs_agent_checkpoint_id |
string |
No | |
vcs_agent_session_id |
string |
No |
Responses
200: Success
application/json
The response is object.
201: Successful response
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 |
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
list
GET /api/v1/organizations/{organization_id}/artefacts
Operation ID: api_v1_organization_artefacts.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
limit |
query |
integer |
No | |
cursor |
query |
string |
No | Opaque next cursor from the preceding page with the same filters. |
q |
query |
string |
No | |
source |
query |
enum: automation, agent, user |
No | |
kind |
query |
string |
No | |
harness |
query |
string |
No | |
model |
query |
string |
No | |
author |
query |
string |
No | Publisher public ID, email, or unambiguous name. |
repo |
query |
string |
No | Repository slug or public ID within the organization. |
slug |
query |
string |
No | List available versions of one artefact slug. |
created_by_agent |
query |
string |
No | Only documents originally created by this persistent agent public ID. Unattributed legacy documents are excluded; later edits do not change the creator. |
editable |
query |
enum: true |
No | Only the newest version of each Markdown document |
Responses
200: Successful response
application/json
| Property | Type | Required | Description |
|---|---|---|---|
artefacts |
array of object |
Yes | |
artefacts[].automation_invocation_id |
string |
No | |
artefacts[].byte_size |
integer |
Yes | |
artefacts[].checksum_sha256 |
string |
Yes | |
artefacts[].content_type |
string |
Yes | |
artefacts[].created_at |
string |
No | |
artefacts[].created_by_user_id |
string |
No | |
artefacts[].description |
string |
No | |
artefacts[].document_key |
string |
No | Stable document identity shared by all revisions. |
artefacts[].entrypoint |
string |
No | |
artefacts[].expires_at |
string |
No | |
artefacts[].filename |
string |
Yes | |
artefacts[].files |
array of object |
No | |
artefacts[].files[].byte_size |
integer |
Yes | |
artefacts[].files[].checksum_sha256 |
string |
Yes | |
artefacts[].files[].content_type |
string |
Yes | |
artefacts[].files[].path |
string |
Yes | |
artefacts[].files[].version_id |
string |
No | |
artefacts[].harness |
string |
No | |
artefacts[].harness_version |
string |
No | |
artefacts[].id |
string |
Yes | |
artefacts[].kind |
string |
Yes | |
artefacts[].model |
string |
No | |
artefacts[].organization_id |
string |
Yes | |
artefacts[].published_at |
string |
No | |
artefacts[].repository_id |
string |
No | |
artefacts[].slug |
string |
Yes | |
artefacts[].source |
string |
Yes | |
artefacts[].status |
string |
Yes | |
artefacts[].title |
string |
Yes | |
artefacts[].vcs_agent_checkpoint_id |
string |
No | |
artefacts[].vcs_agent_session_id |
string |
No | |
artefacts[].version |
integer |
Yes | |
artefacts[].view_url |
string (uri) |
Yes | |
artefacts[].web_url |
string (uri) |
Yes | |
pagination |
object |
Yes | |
pagination.limit |
integer |
Yes | |
pagination.next |
string |
No |
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
load
GET /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}
Operation ID: api_v1_organization_artefact.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
artefact_ref |
path |
string |
Yes |
Responses
200: Successful response
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 |
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
GET /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/download
Operation ID: download_api_v1_organization_artefact.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
artefact_ref |
path |
string |
Yes | |
path |
query |
string |
No | Exact file path within the selected revision manifest. |
Responses
200: Private attachment
application/json
The response is object.
application/octet-stream
The response is string (binary).
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
patch
PATCH /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}
Operation ID: patch_api_v1_organizations_organization_id_artefacts_artefact_ref_.
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 |
|---|---|---|---|
description |
string |
No | |
kind |
string |
No | |
title |
string |
No |
Responses
200: Successful response
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 |
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
remove
DELETE /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}
Operation ID: delete_api_v1_organizations_organization_id_artefacts_artefact_ref_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
artefact_ref |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
204: Deleted
401: Authentication required
403: Author or admin required
404: Not found
422: Invalid document or quota exceeded
502: Bad gateway
update
PUT /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}
Operation ID: put_api_v1_organizations_organization_id_artefacts_artefact_ref_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
artefact_ref |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
PUT /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/draft
Operation ID: draft_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 |
|---|---|---|---|
content |
string |
Yes | Markdown, including CriticMarkup suggestions and comment anchors. |
revision |
integer |
Yes | The working-copy revision the editor last saw. |
Responses
200: Working copy saved
application/json
| Property | Type | Required | Description |
|---|---|---|---|
revision |
integer |
Yes | The working copy's new revision. |
version |
integer |
Yes | The newest published version. |
404: Not found
409: Someone else saved the working copy or a newer version first
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | |
latest_version |
integer |
No | |
revision |
integer |
No |