Skip to main content
Every write in KiwiFS creates a git commit. The versioning API exposes the full git history for any file, letting you view past versions, compare changes, and trace authorship.

Version history

Get the git log for a specific file.
string
required
File path relative to the knowledge root.

Read a specific version

Retrieve the file content at a specific commit.
string
required
File path relative to the knowledge root.
string
required
Git commit hash (full or abbreviated).

Diff between versions

Get a unified diff between two commits for a file.
string
required
File path relative to the knowledge root.
string
required
Starting commit hash.
string
required
Ending commit hash.

Blame

Get per-line git blame attribution for a file. Each line maps to the commit that last modified it.
string
required
File path relative to the knowledge root.
Use blame to trace which agent or user wrote each section. The author field corresponds to the X-Actor header set during the write.

Change feed

Get a paginated feed of all changes across the knowledge base since a given commit. Useful for syncing external systems or building audit logs.
string
Git commit hash to start from. Omit to get the most recent changes.
integer
default:"50"
Max changes to return (capped at 500).
Pass last_seq as the since parameter on the next request to paginate forward.

Optimistic locking with ETag

The versioning system powers optimistic locking. When you read a file, the response includes an ETag header with the current git blob SHA. Pass this value in the If-Match header on writes to detect concurrent modifications.
If another write occurred between your read and write, you receive a 409 Conflict response:
Last modified on May 4, 2026