Auboz API

Documents

Manage and inspect documents in your knowledge base.

List Documents

GET /v1/kb/workspaces/{id}/documents

Returns all documents in a workspace.

Scope: kb:read

Get Document

GET /v1/kb/documents/{id}

Returns metadata for a specific document.

Scope: kb:read

Delete Document

DELETE /v1/kb/documents/{id}

Permanently deletes a document and its embeddings.

Scope: kb:write

Preview Document

GET /v1/kb/documents/{id}/preview?workspace_id={ws_id}&chunks=10

Returns the document content along with its first N chunks. Useful for inspecting how a document was parsed and chunked.

Scope: kb:read

ParameterTypeDescription
workspace_idstringRequired. Workspace ID
chunksnumberNumber of chunks to include (default: 10)

Get Document Chunks

GET /v1/kb/documents/{id}/chunks?workspace_id={ws_id}

Returns all chunks for a document, showing how it was split for embedding.

Scope: kb:read

ParameterTypeDescription
workspace_idstringRequired. Workspace ID

Get Chunk Context

GET /v1/kb/documents/{id}/chunks/{chunk_index}/context?workspace_id={ws_id}&before=2&after=2

Returns surrounding chunks for context around a specific chunk. Useful for understanding where a search result fits in the original document.

Scope: kb:read

ParameterTypeDescription
workspace_idstringRequired. Workspace ID
beforenumberNumber of chunks before (default: 2)
afternumberNumber of chunks after (default: 2)

Grep Document

GET /v1/kb/documents/{id}/grep?workspace_id={ws_id}&pattern={pattern}

Pattern search within a document's chunks. Returns matching chunks with highlighted matches.

Scope: kb:read

ParameterTypeDescription
workspace_idstringRequired. Workspace ID
patternstringRequired. Search pattern
case_sensitivebooleanCase-sensitive search (default: false)

On this page