Prepare Attachment Download
prepare_attachment_downloadGenerate a verified one-time download URL for an Allure TestOps attachment from its ID and kind. Obtain a short-lived HTTP link after retrieving attachment details, before it expires.
Instructions
Prepare one verified attachment download, then HTTP GET its returned Lucius URL.
Call this after get_test_result or get_test_case_details provides an attachment ID, kind, and owner context. The returned download URL is one-time and short-lived: HTTP GET it before expires_at without an Allure bearer token. Prepare again if the URL expires or was already retrieved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Optional override for the default Project ID. | |
| test_case_id | No | Required owner ID for test_case attachments. | |
| attachment_id | Yes | Attachment ID discovered from a readable result or test case. | |
| output_format | No | Output format: 'json' (default) or 'plain'. | |
| test_result_id | No | Required owner ID for test_result or fixture_result attachments. | |
| attachment_kind | Yes | Verified attachment kind: test_result, fixture_result, or test_case. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Sanitized attachment filename. | |
| expires_at | Yes | UTC expiry timestamp for the one-time download URL. | |
| content_type | Yes | Attachment MIME type. | |
| download_url | Yes | Opaque Lucius URL to HTTP GET before expires_at; no Allure bearer token is needed. | |
| test_case_id | No | Owner context for test-case attachments. | |
| attachment_id | Yes | Verified attachment identifier. | |
| content_length | Yes | Prepared attachment byte length. | |
| test_result_id | No | Owner context for result or fixture attachments. | |
| attachment_kind | Yes | Verified attachment owner kind. |