Directory tree
Retrieve the directory tree as a JSON array.string
default:"/"
Root path to list. Omit to list the entire knowledge base.
array
Read a file
Retrieve raw markdown content. The response includes anETag header containing the git blob SHA for optimistic locking.
string
required
File path relative to the knowledge root.
Read a symlink target
When a path in the knowledge root is a symbolic link, resolve its target without following into arbitrary filesystem paths outside the guard:404 when the path does not exist; 400 when the path exists but is not a symlink.
Write a file
Create or update a file. The request body is raw markdown. KiwiFS creates a git commit for each write.string
required
File path relative to the knowledge root.
string
Git commit author attribution (e.g.
agent:my-agent).string
Lineage tracking (e.g.
run:run-249).string
ETag from a previous read. If the file has changed since your read, the server returns
409 Conflict.Delete a file
Delete a file and create a git commit recording the deletion.string
required
File path to delete.
Bulk write
Write multiple files in a single git commit. This is more efficient than individual writes and keeps your git history clean.string
Git commit author attribution.
Upload assets
Upload binary files (images, PDFs, etc.) as multipart form data.Table of contents
Get the heading outline for a file.string
required
File path to extract headings from.
Append to a file
Append content to an existing file without reading it first.string
required
File path to append to.
string
default:"\\n"
String inserted between existing content and new content.
Rename a file
Rename or move a file. Wiki links pointing to the old path are automatically updated.string
required
Old file path.
string
required
New file path.
boolean
default:"true"
Rewrite wiki links in other files that point to the old path.
Rename a directory
Move an entire directory and update all internal links.string
required
Old directory path.
string
required
New directory path.
Templates
List and read page templates stored in.kiwi/templates/.
List templates
Read a template
Resolve wiki links
Resolve[[wiki-links]] to their canonical file paths and permalinks.