Revert a wiki page to an earlier revision
Rolls the page (slug in the body, like move-page) back to the content of the given stored revision. Applied as a regular edit: the pre-revert state is snapshotted and the version advances.
Path parameters
Knowledge base ID
Request body
Response
OK
Alternate names, abbreviations, acronyms or translated names
CategoryPath is the directory breadcrumb that groups this page in the wiki browser, e.g. ["AI", "LLM 应用", "RAG"]. Derived cache of the folder chain identified by FolderID.
ChunkRefs records the specific source-document chunks this page was built from — one UUID per cited chunk. Populated during ingest from the chunk-citation pass; refreshed wholesale whenever the page is re-materialized. Empty for summary pages (they are document-level synopses and don't carry chunk-level citations). Use this when you need to surface the underlying evidence for a wiki page, or to retract citations when a source document is deleted.
Full markdown content
Creation time
Depth is len(CategoryPath), cached for filtering / display.
FolderID is the single source of truth for where this page sits in the directory tree — a reference to wiki_folders.id ("" = wiki root). The CategoryPath / WikiPath / Depth fields below are denormalized caches recomputed from this folder's chain on every write so list/index/search queries don't have to join wiki_folders.
Unique identifier (UUID)
Slugs of pages that link TO this page (backlinks)
Knowledge base this page belongs to
LastEditSource records who authored the CURRENT version: pipeline | agent | user | revert. Empty for legacy rows (treated as pipeline). When the version is superseded this value travels into the revision snapshot, so each historical version keeps its own author kind.
LastEditorID is the user id of the caller that produced the current version (empty for background pipeline writes).
Slugs of pages this page links to (outbound links)
Arbitrary metadata (tags, categories, dates, etc.)
Page type: summary, entity, concept, index, synthesis, comparison
ParentSlug optionally points at the wiki page that should act as this page's semantic parent in the directory tree. The parent may be empty when the page is grouped only by FolderID.
URL-friendly slug for addressing, e.g. "entity/acme-corp", "concept/rag" Unique within a knowledge base
SortOrder allows generated or manually edited pages to control sibling ordering before falling back to title.
References to source knowledge IDs that contributed to this page. Format matches the legacy "<knowledge_id>|<doc_title>" convention used across the ingest pipeline, so retract / display code can split on | to recover the title. Document-level granularity.
Page status: draft, published, archived
One-line summary for index listing
Workspace ID for multi-workspace isolation
Human-readable title
Last update time
Version number. Incremented only when a user-visible content field (title, content, summary, page_type, status) actually changes; pure bookkeeping writes (link maintenance, same-content re-ingest, status sync from background jobs) leave it untouched so it can be used as a real "the page was edited" signal.
WikiPath is a normalized, sortable path derived from page_type, category_path, and title. It keeps large directory listings cheap to sort.