List a document's attachments.
The documents attached under the document's main document number that the caller can read, the main document itself included, each with its place in the attachment tree: main_document_number, parent_document_id (null for the root or an unreadable parent), is_root and depth (0 for the main document, 1 for MAIN.001, 2 for MAIN.001.001).
| |
|---|
| Scope | documents:read |
| Asynchronous | No |
| MCP tool | list_document_attachments |
| Portal permissions | view_document_attachments |
| Paging | keyset |
| Default order | attached_document_id |
| Sort fields | attached_document_id |
Parameters
| Name | In | Type | Required | Description |
|---|
document_id | path | string | Required | |
limit | query | integer | Optional | Default: 50; ≥ 1 |
cursor | query | string | Optional | |
sort | query | string | Optional | Comma-separated sort fields, - for descending. |
Docwize-Version | header | string (date) | Optional | |
If-None-Match | header | string | Optional | Answers 304 when the representation is unchanged (resources that publish an ETag). |
Responses
200 body
| Field | Type | Required | Description |
|---|
items | array of Attachment | Required | |
next_cursor | string or null | Required | |
warnings | array of object | Required | |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
Attachment
| Field | Type | Required | Description |
|---|
attached_document_id | string | Required | |
depth | integer | Required | How many attachment levels below the main document: 0 for the main document, 1 for MAIN.001, 2 for MAIN.001.001. ≥ -2147483648; ≤ 2147483647 |
document_number | string or null | Required | |
is_root | boolean | Required | True when the document has no parent you can read: the main document the tree hangs from, as the Explorer's lineage view marks it. |
main_document_number | string or null | Required | The number of the document this one hangs from (the Portal's Main Doc Number); the document's own number, or null, for the root of the tree. |
parent_document_id | string or null | Required | The document this one is attached to; null for the root of the tree and when the parent is not readable by you. |