Get Orphan Documents
get_orphan_docsFind documents with no parent or incoming links in an AFFiNE workspace to identify orphaned docs for cleanup and workspace hygiene.
Instructions
Find all documents that have no parent (not linked from any other doc via embed_linked_doc / embed_synced_doc blocks or inline LinkedPage references). Useful for workspace hygiene. Note: scans all docs — O(n). Each doc includes an inTrash flag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| count | No | ||
| error | No | ||
| details | No | ||
| orphans | No | ||
| causeCode | No | ||
| retryable | No | ||
| recoveryGuidance | No |