list_attachments
List attachments from a Zephyr Scale test case, test run, or test result. Optionally filter by step index for test cases and test results.
Instructions
List the attachments of a Zephyr Scale test case, test run (cycle) or test result — optionally of a single step (GET /testcase/{key}[/step/{i}]/attachments, /testrun/{key}/attachments or /testresult/{id}[/step/{i}]/attachments). Addressing: target 'test_case' requires testCaseKey (stepIndex optional to address a specific step); target 'test_run' requires testRunKey (no step addressing — the API has no per-step endpoint for runs); target 'test_result' requires testResultId (stepIndex optional). Pass ONLY the identifier that matches the chosen target. Returns the attachment list as reported by the API; the numeric ids can be passed to delete_attachment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Kind of entity the attachment belongs to: test_case, test_run or test_result | |
| stepIndex | No | 0-based step index to address a single step instead of the whole entity (targets 'test_case' and 'test_result' only) | |
| testRunKey | No | Test run (cycle) key, e.g. PROJ-R123 — required when target is 'test_run' | |
| testCaseKey | No | Test case key, e.g. PROJ-T123 — required when target is 'test_case' | |
| testResultId | No | Numeric test result id — required when target is 'test_result'. Result ids are returned by create_test_result / update_last_test_result / get_test_run_results. |