Vine of Time Logo
Open API Docs

API Overview

Admin
2026/4/3
3 阅读

API Overview

Base path

/api/open/documents

Endpoints

MethodPathDescription
GET/api/open/documentsGet the document list
GET/api/open/documents/:idGet document details
POST/api/open/documentsCreate a document
PUT/api/open/documents/:idUpdate a document
DELETE/api/open/documents/:idDelete a document

Resource model

Core document fields include:

  • id
  • title
  • slug
  • content
  • excerpt
  • published
  • parentId
  • categoryId
  • order
  • authorId
  • createdAt
  • updatedAt

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 categoryId is 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

StatusMeaning
200Success
201Created
400Invalid parameters
401Authentication failed
404Resource not found
500Server error