How to download attachments from test run evidence?

Vignesh Sundar February 11, 2021

Hi, I am trying to download the attachments from test run evidence using python script. But I am unable to download it. 

I am using the rest api suggested by the xray cloud documents. 

https://docs.getxray.app/display/XRAYCLOUD/Attachments+-+REST

Here is the API I used, https://xray.cloud.xpand-it.com/api/v1/attachments/{attachmentId}

But that is always through response code 404. 

TestRun results are shown in different link like execution page.

Here is my attachment link,

https://xray.cloud.xpand-it.com/api/internal/attachments/{attachmentId}

 

Can anyone please help me to download the attachments from above API

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2021

Hi @Vignesh Sundar 

 

The API seems correct, although we advise using version 2 of API:

https://docs.getxray.app/display/XRAYCLOUD/Attachments+-+REST+v2

Before using this request, it is necessary to set up API Keys (https://docs.getxray.app/display/XRAYCLOUD/Global+Settings%3A+API+Keys) and perform authentication (https://docs.getxray.app/display/XRAYCLOUD/Authentication+-+REST) to get a valid token.

Also, we advise making command-line tests using the API to make sure all requests are working as expected.

If you need further help, please contact Xray Support (http://xraysupport.xpand-it.com) so that we can request additional information and investigate further.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events