OpenMax
Free Trial

Apps API · KB Tree

KB Tree: 13 endpoints

← All groups

GET /api/v1/kbs/{kb_id}/tree

Get full tree

Scope: kb:file:read · Called with: appToken · operationId: get-full-tree

Required app scope: kb:file:read.

Returns the KB tree. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID

Responses

POST /api/v1/kbs/{kb_id}/tree/files

Create tree file node

Scope: kb:file:write · Called with: appToken · operationId: create-tree-file

Required app scope: kb:file:write.

Creates a tree file node. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID

Request body

application/json · CreateFileNodeRequestBody

Field Type Required Description
artifact_id string (uuid) yes Artifact UUID
name string yes File node name
parent_id string (uuid) Parent node UUID

Responses

POST /api/v1/kbs/{kb_id}/tree/files/batch-download

Batch get file downloads

Scope: kb:file:read · Called with: appToken · operationId: batch-get-file-download

Required app scope: kb:file:read.

Returns presigned file download URLs. When knowledge-base download tickets are enabled, download_url is a short-lived platform URL (download-artifact-ticket) instead of a storage URL and expires_at is the ticket expiry: single-use for inline=false, reusable until expiry for inline=true; the knowledge-base read access of the caller is re-checked when it is opened. Fetch it when the file is opened rather than keeping it. If a ticket cannot be issued the request fails with 503 ARTIFACT_ACCESS_UNAVAILABLE and no URL is returned. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID

Request body

application/json · BatchGetFileDownloadRequestBody

Field Type Required Description
inline boolean yes Request inline content disposition
node_ids array of string yes Tree node UUIDs

Responses

POST /api/v1/kbs/{kb_id}/tree/folders

Create tree folder

Scope: kb:file:write · Called with: appToken · operationId: create-tree-folder

Required app scope: kb:file:write.

Creates a tree folder. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID

Request body

application/json · CreateFolderRequestBody

Field Type Required Description
name string yes Folder name
parent_id string (uuid) Parent node UUID

Responses

DELETE /api/v1/kbs/{kb_id}/tree/nodes/{node_id}

Delete tree node

Scope: kb:page:delete · Called with: appToken · operationId: delete-tree-node

Required app scope: kb:page:delete.

Deletes a tree node. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Responses

GET /api/v1/kbs/{kb_id}/tree/nodes/{node_id}

Get tree node

Scope: kb:file:read · Called with: appToken · operationId: get-tree-node

Required app scope: kb:file:read.

Returns a tree node. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Responses

GET /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/breadcrumb

Get tree breadcrumb

Scope: kb:file:read · Called with: appToken · operationId: get-tree-breadcrumb

Required app scope: kb:file:read.

Returns breadcrumb nodes. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Responses

GET /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/children

List tree children

Scope: kb:file:read · Called with: appToken · operationId: list-tree-children

Required app scope: kb:file:read.

Returns child tree nodes. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Responses

GET /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/download

Get file download

Scope: kb:file:read · Called with: appToken · operationId: get-file-download

Required app scope: kb:file:read.

Returns a presigned file download URL. When knowledge-base download tickets are enabled, download_url is a short-lived platform URL (download-artifact-ticket) instead of a storage URL and expires_at is the ticket expiry: single-use for inline=false, reusable until expiry for inline=true; the knowledge-base read access of the caller is re-checked when it is opened. Fetch it when the file is opened rather than keeping it. If a ticket cannot be issued the request fails with 503 ARTIFACT_ACCESS_UNAVAILABLE and no URL is returned. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID
inline query boolean Request inline content disposition

Responses

POST /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/move

Move tree node

Scope: kb:file:write · Called with: appToken · operationId: move-tree-node

Required app scope: kb:file:write.

Moves a tree node. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Request body

application/json · MoveNodeRequestBody

Field Type Required Description
parent_id string (uuid) New parent node UUID

Responses

GET /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/preview

Get file preview info

Scope: kb:file:read · Called with: appToken · operationId: get-file-preview-info

Required app scope: kb:file:read.

Returns file preview metadata. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Responses

PATCH /api/v1/kbs/{kb_id}/tree/nodes/{node_id}/rename

Rename tree node

Scope: kb:file:write · Called with: appToken · operationId: rename-tree-node

Required app scope: kb:file:write.

Renames a tree node. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID
node_id path string (uuid) yes Tree node UUID

Request body

application/json · RenameNodeRequestBody

Field Type Required Description
name string yes Tree node name

Responses

GET /api/v1/kbs/{kb_id}/tree/roots

List tree roots

Scope: kb:file:read · Called with: appToken · operationId: list-tree-roots

Required app scope: kb:file:read.

Returns root tree nodes. Response wrapped in standard envelope.

Parameters

Name In Type Required Description
kb_id path string (uuid) yes KB UUID

Responses