API

Knowledge

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}/verify/knowledge create Document saved
GET /api/v1/organizations/{organization_id}/verify/knowledge/{id} load Markdown document and viewer permissions
GET /api/v1/organizations/{organization_id}/verify/knowledge load Project selection and most recent 50 matching knowledge documents
PATCH /api/v1/organizations/{organization_id}/verify/knowledge/{id} patch Markdown document saved
DELETE /api/v1/organizations/{organization_id}/verify/knowledge/{id} remove Success
PUT /api/v1/organizations/{organization_id}/verify/knowledge/{id} update Success

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:

knowledge, err := client.Knowledge(nil).Load(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(knowledge)
created, err := client.Knowledge(nil).Create(map[string]any{"organization_id": "example", "markdown": "example", "project_id": "example", "title": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.Knowledge(nil).Update(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.Knowledge(nil).Patch(map[string]any{"id": "example_id", "organization_id": "example", "expected_digest": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.Knowledge(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 knowledge, err = client:Knowledge():load({ organization_id = "example" })
local created, err = client:Knowledge():create({ organization_id = "example", markdown = "example", project_id = "example", title = "example" })
local updated, err = client:Knowledge():update({ id = "example_id", organization_id = "example" })
local patched, err = client:Knowledge():patch({ id = "example_id", organization_id = "example", expected_digest = "example" })
local removed, err = client:Knowledge():remove({ id = "example_id", organization_id = "example" })

PHP

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

$knowledge = $client->Knowledge()->load(["organization_id" => "example"]);
$created = $client->Knowledge()->create(["organization_id" => "example", "markdown" => "example", "project_id" => "example", "title" => "example"]);
$updated = $client->Knowledge()->update(["id" => "example_id", "organization_id" => "example"]);
$patched = $client->Knowledge()->patch(["id" => "example_id", "organization_id" => "example", "expected_digest" => "example"]);
$client->Knowledge()->remove(["id" => "example_id", "organization_id" => "example"]);

Python

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

knowledge = client.Knowledge().load({"organization_id": "example"})
created = client.Knowledge().create({ "organization_id": "example", "markdown": "example", "project_id": "example", "title": "example" })
updated = client.Knowledge().update({"id": "example_id", "organization_id": "example"})
patched = client.Knowledge().patch({"id": "example_id", "organization_id": "example", "expected_digest": "example"})
client.Knowledge().remove({"id": "example_id", "organization_id": "example"})

Ruby

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

knowledge = client.Knowledge.load({ "organization_id" => "example" })
created = client.Knowledge.create({ "organization_id" => "example", "markdown" => "example", "project_id" => "example", "title" => "example" })
updated = client.Knowledge.update({ "id" => "example_id", "organization_id" => "example" })
patched = client.Knowledge.patch({ "id" => "example_id", "organization_id" => "example", "expected_digest" => "example" })
client.Knowledge.remove({ "id" => "example_id", "organization_id" => "example" })

TypeScript

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

const knowledge = await client.Knowledge().load({ organization_id: "example" })
const created = await client.Knowledge().create({ organization_id: "example", markdown: "example", project_id: "example", title: "example" })
const updated = await client.Knowledge().update({ id: "example_id", organization_id: "example" })
const patched = await client.Knowledge().patch({ id: "example_id", organization_id: "example", expected_digest: "example" })
await client.Knowledge().remove({ id: "example_id", organization_id: "example" })

Fields

Field Type Required Description
content_digest string Yes Content Digest
content_json object Yes Content Json
document object Yes Document
documents array Yes Documents
dreaming object Yes Dreaming
expected_digest string Yes Expected Digest
history array Yes History
id string Yes Id
kind string Yes Kind
markdown string Yes Markdown
observed_at string Yes Observed At
organization object Yes Organization
permissions object Yes Permissions
project_id string Yes Project Id
project_name string Yes Project Name
projects array Yes Projects
selected_project_id one,string,null Yes Selected Project Id
source object Yes Source
title string Yes Title
total integer Yes Total

create

POST /api/v1/organizations/{organization_id}/verify/knowledge

Operation ID: post_api_v1_organizations_organization_id_verify_knowledge.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
markdown string Yes
project_id string Yes
title string Yes

Responses

201: Document saved

application/json

Property Type Required Description
content_digest string Yes
content_json object Yes
content_json.body string No
content_json.cleanup array of string No
content_json.flows array of object No
content_json.flows[].coverage enum: observed, partial, blocked Yes
content_json.flows[].entry_url string Yes
content_json.flows[].expectation_source enum: explicit, inferred Yes
content_json.flows[].expected_behavior string Yes
content_json.flows[].gaps array of string Yes
content_json.flows[].name string Yes
content_json.flows[].observed_behavior string Yes
content_json.flows[].prerequisites array of string Yes
content_json.flows[].purpose string Yes
content_json.flows[].steps array of string Yes
content_json.pages array of object No
content_json.pages[].controls array of object Yes
content_json.pages[].controls[].attempted boolean Yes
content_json.pages[].controls[].destination string Yes
content_json.pages[].controls[].label string Yes
content_json.pages[].description string Yes
content_json.pages[].title string Yes
content_json.pages[].url string Yes
content_json.product object No
content_json.product.concepts array of string Yes
content_json.product.summary string Yes
content_json.product.users array of string Yes
content_json.stopping_reason string No
content_json.unvisited array of string No
id string Yes
kind enum: discovery, operator, learning Yes
markdown string Yes
observed_at string (date-time) Yes
project_id string Yes
project_name string Yes
source object Yes
source.account_id string Yes
source.creator_name string Yes
source.edited_at string No
source.editor_name string No
source.environment_name string Yes
source.exploration_id string Yes
source.run_id string Yes
source.status string Yes
title string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity

load

GET /api/v1/organizations/{organization_id}/verify/knowledge/{id}

Operation ID: api_v1_knowledge.

Authentication: bearer token (bearerAuth).

Parameters

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

Responses

200: Markdown document and viewer permissions

application/json

Property Type Required Description
document object Yes
document.content_digest string Yes
document.content_json object Yes
document.content_json.body string No
document.content_json.cleanup array of string No
document.content_json.flows array of object No
document.content_json.flows[].coverage enum: observed, partial, blocked Yes
document.content_json.flows[].entry_url string Yes
document.content_json.flows[].expectation_source enum: explicit, inferred Yes
document.content_json.flows[].expected_behavior string Yes
document.content_json.flows[].gaps array of string Yes
document.content_json.flows[].name string Yes
document.content_json.flows[].observed_behavior string Yes
document.content_json.flows[].prerequisites array of string Yes
document.content_json.flows[].purpose string Yes
document.content_json.flows[].steps array of string Yes
document.content_json.pages array of object No
document.content_json.pages[].controls array of object Yes
document.content_json.pages[].controls[].attempted boolean Yes
document.content_json.pages[].controls[].destination string Yes
document.content_json.pages[].controls[].label string Yes
document.content_json.pages[].description string Yes
document.content_json.pages[].title string Yes
document.content_json.pages[].url string Yes
document.content_json.product object No
document.content_json.product.concepts array of string Yes
document.content_json.product.summary string Yes
document.content_json.product.users array of string Yes
document.content_json.stopping_reason string No
document.content_json.unvisited array of string No
document.id string Yes
document.kind enum: discovery, operator, learning Yes
document.markdown string Yes
document.observed_at string (date-time) Yes
document.project_id string Yes
document.project_name string Yes
document.source object Yes
document.source.account_id string Yes
document.source.creator_name string Yes
document.source.edited_at string No
document.source.editor_name string No
document.source.environment_name string Yes
document.source.exploration_id string Yes
document.source.run_id string Yes
document.source.status string Yes
document.title string Yes
history array of object Yes
history[].after object Yes
history[].before object Yes
history[].created_at string (date-time) Yes
history[].dream_id string Yes Public id of the nightly dream that made this change; null unless origin is dreaming
history[].id string Yes
history[].operation enum: create, update, archive Yes
history[].origin enum: operator, review, dreaming Yes Operator edit, automatic review of one run, or nightly dreaming
history[].reason string Yes
history[].relations array of object Yes
history[].relations[].id string Yes
history[].relations[].kind enum: related_to, supersedes, contradicts Yes
history[].sources array of object Yes
history[].sources[].environment_id string No
history[].sources[].environment_name string No
history[].sources[].run_id string No
organization object Yes
organization.name string Yes
organization.slug string Yes
permissions object Yes
permissions.manage boolean Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/organizations/{organization_id}/verify/knowledge

Operation ID: api_v1_knowledge_index.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
q query string No
project_id query string No

Responses

200: Project selection and most recent 50 matching knowledge documents

application/json

Property Type Required Description
documents array of object Yes
documents[].id string Yes
documents[].kind enum: discovery, operator, learning Yes
documents[].observed_at string (date-time) Yes
documents[].project_id string Yes
documents[].project_name string Yes
documents[].source object Yes
documents[].source.edited_at string Yes
documents[].title string Yes
dreaming object Yes
dreaming.latest object or null Yes The most recent dream for the selected project, or null before the first one
dreaming.schedule object Yes
dreaming.schedule.next_at string (date-time) Yes Next scheduled start
dreaming.schedule.start_hour integer Yes Local 24-hour clock hour a dream starts
dreaming.schedule.timezone string Yes Organization IANA timezone dreams are scheduled in
organization object Yes
organization.name string Yes
organization.slug string Yes
permissions object Yes
permissions.manage boolean Yes
projects array of object Yes
projects[].id string Yes
projects[].name string Yes
projects[].purpose string Yes
selected_project_id string Yes
total integer Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/organizations/{organization_id}/verify/knowledge/{id}

Operation ID: patch_api_v1_organizations_organization_id_verify_knowledge_id_.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
expected_digest string Yes
markdown string Yes
title string Yes

Responses

200: Markdown document saved

application/json

Property Type Required Description
content_digest string Yes
content_json object Yes
content_json.body string No
content_json.cleanup array of string No
content_json.flows array of object No
content_json.flows[].coverage enum: observed, partial, blocked Yes
content_json.flows[].entry_url string Yes
content_json.flows[].expectation_source enum: explicit, inferred Yes
content_json.flows[].expected_behavior string Yes
content_json.flows[].gaps array of string Yes
content_json.flows[].name string Yes
content_json.flows[].observed_behavior string Yes
content_json.flows[].prerequisites array of string Yes
content_json.flows[].purpose string Yes
content_json.flows[].steps array of string Yes
content_json.pages array of object No
content_json.pages[].controls array of object Yes
content_json.pages[].controls[].attempted boolean Yes
content_json.pages[].controls[].destination string Yes
content_json.pages[].controls[].label string Yes
content_json.pages[].description string Yes
content_json.pages[].title string Yes
content_json.pages[].url string Yes
content_json.product object No
content_json.product.concepts array of string Yes
content_json.product.summary string Yes
content_json.product.users array of string Yes
content_json.stopping_reason string No
content_json.unvisited array of string No
id string Yes
kind enum: discovery, operator, learning Yes
markdown string Yes
observed_at string (date-time) Yes
project_id string Yes
project_name string Yes
source object Yes
source.account_id string Yes
source.creator_name string Yes
source.edited_at string No
source.editor_name string No
source.environment_name string Yes
source.exploration_id string Yes
source.run_id string Yes
source.status string Yes
title string Yes
401: Unauthorized
403: Forbidden
404: Not found
409: Document changed since editing began
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/organizations/{organization_id}/verify/knowledge/{id}

Operation ID: delete_api_v1_organizations_organization_id_verify_knowledge_id_.

Authentication: bearer token (bearerAuth).

Parameters

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

Responses

200: Success

application/json

The response is object.

204: Document archived
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/organizations/{organization_id}/verify/knowledge/{id}

Operation ID: put_api_v1_organizations_organization_id_verify_knowledge_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id 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