Get Document Tree
AI-generatedOverview
This node operation retrieves the tree structure of child documents nested under a specified document in the SiYuan knowledge base. It is useful for visualizing or managing the hierarchical organization of documents within a knowledge base, such as displaying sub-documents or sections under a main document.
Use Case Examples
- A user wants to see all sub-documents under a main project document to understand its structure.
- A knowledge manager needs to fetch the document tree to display it in a custom interface or for further processing.
Properties
| Name | Meaning |
|---|---|
| Document ID | The unique ID of the document whose child document tree is to be retrieved. |
Output
JSON
id- The unique identifier of each document in the tree.title- The title or name of each document in the tree.children- An array representing the nested child documents under each document node, forming the tree structure.
Dependencies
- SiYuan API credentials (API URL and API token) are required to authenticate and interact with the SiYuan knowledge base.
Troubleshooting
- Ensure the provided Document ID is valid and exists in the SiYuan knowledge base; otherwise, the operation may fail or return empty results.
- Check that the API credentials are correctly configured and have sufficient permissions to access document data.
- If the document has no child documents, the returned tree may be empty or minimal.