Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Download attachment via API

Hey,

Is possible to download attachments files via API?
I tried with curl but not working:
curl -H "Content-Type: text/html" -u "name@domain.com:password" "http://mytestrailserver/testrail/index.php?/attachments/get/3" --output myfile.js
The attached file is a JS file.

Thanks

so, I never tried myself, but are you sure about the content.type?
The doc says: Content-Type multipart/form-data

Isn’ the command /attachment/get/ wrong?
In the documentation GET index.php?/api/v2/get_attachment/:attachment_id is listed. (In addition to kwirth’s answer)

Thank you, I saw that after I opened the topic :+1: