Hi
I ran a test using the endpoint below and was able to return details including the path of attachments in a test execution. That path successfully opens the attachment.
For attachments to a test result:
/testresult/{testResultId}/attachments
For attachments to a step:
/testrun/{testRunKey}/testcase/{testCaseKey}/testresult
To implement:
https://jira.[your instance].com/rest/atm/1.0/testresult/[testResultID]/attachments
Thank you to Assis from the support team for providing info on how to find the testResultID:
"You can find the testResultId in the following scenarios:
- If you want to see the last execution of a Test Case, you will find it In the id of the result of {{ GET /testcase/ {testCaseKey}/testresult/latest }}
* If your Test Execution is part of a Test Cycle, you can find it In the id of each item from the results of GET /testrun/{testRunKey}/testresults }}
* When you create a Test Execution using one of the POST endpoints below, the response will return it in the id field
** {{ /testrun/{testRunKey}/testresults
** {{ /testrun/{testRunKey}/testcase/{testCaseKey}"