API

ArtefactCommentThread

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}/comment_threads create Thread created
GET /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/comment_threads list Threads in creation order
PATCH /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/comment_threads/{anchor} update Thread updated

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:

artefact_comment_threads, err := client.ArtefactCommentThread(nil).List(map[string]any{"artefact_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(artefact_comment_threads)
created, err := client.ArtefactCommentThread(nil).Create(map[string]any{"artefact_id": "example", "organization_id": "example", "anchor": "example", "body": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.ArtefactCommentThread(nil).Update(map[string]any{"artefact_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

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

local artefact_comment_threads, err = client:ArtefactCommentThread():list({ artefact_id = "example", organization_id = "example" })
local created, err = client:ArtefactCommentThread():create({ artefact_id = "example", organization_id = "example", anchor = "example", body = "example" })
local updated, err = client:ArtefactCommentThread():update({ artefact_id = "example", organization_id = "example" })

PHP

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

$artefact_comment_threads = $client->ArtefactCommentThread()->list(["artefact_id" => "example", "organization_id" => "example"]);
$created = $client->ArtefactCommentThread()->create(["artefact_id" => "example", "organization_id" => "example", "anchor" => "example", "body" => "example"]);
$updated = $client->ArtefactCommentThread()->update(["artefact_id" => "example", "organization_id" => "example"]);

Python

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

artefact_comment_threads = client.ArtefactCommentThread().list({"artefact_id": "example", "organization_id": "example"})
created = client.ArtefactCommentThread().create({ "artefact_id": "example", "organization_id": "example", "anchor": "example", "body": "example" })
updated = client.ArtefactCommentThread().update({"artefact_id": "example", "organization_id": "example"})

Ruby

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

artefact_comment_threads = client.ArtefactCommentThread.list({ "artefact_id" => "example", "organization_id" => "example" })
created = client.ArtefactCommentThread.create({ "artefact_id" => "example", "organization_id" => "example", "anchor" => "example", "body" => "example" })
updated = client.ArtefactCommentThread.update({ "artefact_id" => "example", "organization_id" => "example" })

TypeScript

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

const artefact_comment_threads = await client.ArtefactCommentThread().list({ artefact_id: "example", organization_id: "example" })
const created = await client.ArtefactCommentThread().create({ artefact_id: "example", organization_id: "example", anchor: "example", body: "example" })
const updated = await client.ArtefactCommentThread().update({ artefact_id: "example", organization_id: "example" })

Fields

Field Type Required Description
anchor string Yes The #anchor written into the Markdown.
body string Yes Body
comments array Yes Comments
id string Yes The anchor key.
quote string No Quote
resolved boolean Yes Resolved

create

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

Operation ID: post_api_v1_organizations_organization_id_artefacts_artefact_ref_comment_threads.

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
anchor string Yes The #anchor written into the Markdown.
body string Yes
quote string No

Responses

201: Thread created

application/json

Property Type Required Description
thread object Yes
thread.comments array of object Yes
thread.comments[].author string Yes
thread.comments[].author_id string Yes
thread.comments[].author_kind enum: person, agent Yes
thread.comments[].body string Yes
thread.comments[].created_at string (date-time) Yes
thread.comments[].id string Yes
thread.id string Yes The anchor key.
thread.quote string Yes
thread.resolved boolean Yes
404: Not found
409: The anchor already has a thread
422: Invalid anchor or comment

list

GET /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/comment_threads

Operation ID: comment_threads_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: Threads in creation order

application/json

Property Type Required Description
threads array of object Yes
threads[].comments array of object Yes
threads[].comments[].author string Yes
threads[].comments[].author_id string Yes
threads[].comments[].author_kind enum: person, agent Yes
threads[].comments[].body string Yes
threads[].comments[].created_at string (date-time) Yes
threads[].comments[].id string Yes
threads[].id string Yes The anchor key.
threads[].quote string Yes
threads[].resolved boolean Yes
404: Not found

update

PATCH /api/v1/organizations/{organization_id}/artefacts/{artefact_ref}/comment_threads/{anchor}

Operation ID: patch_api_v1_organizations_organization_id_artefacts_artefact_ref_comment_threads_anchor_.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
resolved boolean Yes

Responses

200: Thread updated

application/json

Property Type Required Description
thread object Yes
thread.comments array of object Yes
thread.comments[].author string Yes
thread.comments[].author_id string Yes
thread.comments[].author_kind enum: person, agent Yes
thread.comments[].body string Yes
thread.comments[].created_at string (date-time) Yes
thread.comments[].id string Yes
thread.id string Yes The anchor key.
thread.quote string Yes
thread.resolved boolean Yes
404: Not found