create_document_attachments
Upload multiple local files as document attachments in a single request, with validation for duplicates and size limits. Specify project, space, document, and file paths.
Instructions
Upload 1-10 local files as document attachments in one request.
file_path is read from local disk by the server process -- use absolute paths to readable files. file_name (default: file_path's basename) becomes the attachment id; reference it in a document body as attachment:{id} for update_document. Total upload size per call is capped at 25 MiB: compress or use the Polarion portal for one oversized file, split oversized batches across calls. Pure create -- nothing is replaced. Uploads cannot be deleted through this API, so verify file_path and file_name first. A file_name colliding with another item in the same call, or with an existing attachment on the document, rejects the whole batch -- check list_document_attachments first or pick a new file_name. NOT idempotent -- retrying a success is rejected as a duplicate, not silently merged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview payload without calling Polarion. | |
| space_id | Yes | Space ID ('_default' = default space). | |
| project_id | Yes | Polarion project ID. | |
| attachments | Yes | Files to upload in one request. | |
| document_name | Yes | Document name within space_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| created | Yes | ||
| dry_run | Yes | ||
| attachment_ids | Yes | ||
| payload_preview | Yes |