The documents endpoints expose the mirror-model document ledger — a live scan of a registered world’s folder tree. Each document is identified by its world-root-relative path (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tudoumono/Sherpa/llms.txt
Use this file to discover all available pages before exploring further.
doc_id); physical paths on disk are never returned. You can browse scoped folder prefixes for use in chat and impact queries, download original source files (Office documents, COBOL sources, Markdown) for citation, and preview a world’s document set before or after ingest.
GET /documents
GET/documents
Return the document ledger for a world. Documents are derived from a live folder scan; the list always reflects the current state of the registered directory.
Query parameters
World identifier. Must match
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$.Response
The world ID the ledger was generated for.
Array of document records. Physical paths are not included.
GET /documents/download
GET/documents/download
Download the original source file for a document in a world. This is the citation download endpoint — it serves the raw binary (.xlsx, .docx, .cbl, .md, etc.) as a file attachment. The path is resolved against the world’s registered root directory; path traversal attempts return 404. This action is recorded in the audit log.
Query parameters
World identifier. Must match
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$.World-root-relative path of the document to download (the
name / doc_id field from the ledger). The path must be within the world’s registered root directory.Response
Binary file content withContent-Disposition: attachment; filename="<filename>". The MIME type is determined by the file extension.
GET /scopes
GET/scopes
Return the available scope paths (subfolder prefixes with document counts) for a world. Use this endpoint to populate the scope selector in the UI or to enumerate valid values for the scope_paths field in chat, impact, and graph requests.
Query parameters
World identifier.
Response
A scope tree object. The exact shape is determined byscope.scope_tree() — each entry in the tree includes the folder prefix and a document count.
GET /ingest/preview
GET/ingest/preview
Preview the documents and extracted knowledge for a world without triggering a new ingest run. Returns the extraction state — entities, relations, and document list — as currently stored in the derived data. Admin only.
Query parameters
World identifier.
Response
World ID.
Summary counts:
entities, entities_static, entities_llm, entities_both, relations, relations_static, relations_llm, relations_both, deprecated, hidden.Preview document list. Each entry has
name, doctype, branch, top_scope, phase, category, folder, state, label, and reason.GET /versions
GET/versions
List all registered worlds and their display labels. This is a backwards-compatibility endpoint; the canonical world management API is GET /worlds.
The UI’s world selector uses
GET /worlds. Use GET /versions only if you need a lightweight name→label map for an existing integration.Response
Array of world identifiers.
Map of
world_id → display label string.