Open API Docs
API Overview
Admin
2026/4/3
3 阅读
API Overview
Base path
/api/open/documents
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/open/documents | Get the document list |
| GET | /api/open/documents/:id | Get document details |
| POST | /api/open/documents | Create a document |
| PUT | /api/open/documents/:id | Update a document |
| DELETE | /api/open/documents/:id | Delete a document |
Resource model
Core document fields include:
idtitleslugcontentexcerptpublishedparentIdcategoryIdorderauthorIdcreatedAtupdatedAt
Category and hierarchy rules
- Top-level documents can define a category directly.
- Child documents inherit the category from the top-level document.
- When a child document is created, an incoming
categoryIdis ignored. - When a document is moved under another parent, its category follows the new top-level branch.
- Changing a top-level category recursively updates the entire subtree.
Common status codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Invalid parameters |
| 401 | Authentication failed |
| 404 | Resource not found |
| 500 | Server error |
