Open API Docs
Update Document
Admin
2026/4/3
5 阅读
Update Document
Endpoint
PUT /api/open/documents/:id
Updatable fields
titleslugcontentexcerptorderpublishedparentIdcategoryIdfor top-level documents
Important rules
- A document cannot become its own parent.
- A document cannot be moved under its own descendant.
- If the document becomes a child node, its category follows the new top-level branch.
- If the category of a top-level document changes, the subtree category is synchronized recursively.
Recommendations
- Treat hierarchy changes as a structural operation and validate them carefully.
- If you expose this capability externally, record audit logs for parent/category changes.
