Error 400 Bad Request When Downloading Attachments via GraphQL and Wget

Gina Ozimisa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2023

Hello. When I use GraphQL to retrieve evidence (https://xray.cloud.getxray.app/doc/graphql/evidence.doc.html), it returns the information, including the download link. When I try to download it on an Ubuntu server using wget and the Xray token, I encounter the following error:

--2023-10-11 14:38:15-- https://xray.cloud.getxray.app/api/v2/attachments/a25...
Resolving xray.cloud.getxray.app (xray.cloud.getxray.app)... [IP Address]
Connecting to xray.cloud.getxray.app (xray.cloud.getxray.app)|[IP Address]|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://xray-cloud-production.s3.amazonaws.com/attachments/b8.../a25...?AWSAccessKeyId=[Access Key]&Expires=1697035126&Signature=[Signature]&response-content-disposition=attachment%3B%20filename%3DIOS-EF-3416.mp4 [following]
--2023-10-11 14:38:16-- https://xray-cloud-production.s3.amazonaws.com/attachments/b8.../a25...?AWSAccessKeyId=[Access Key]&Expires=1697035126&Signature=[Signature]&response-content-disposition=attachment%3B%20filename%3DIOS-EF-3416.mp4
Resolving xray-cloud-production.s3.amazonaws.com (xray-cloud-production.s3.amazonaws.com)... [IP Address]
Connecting to xray-cloud-production.s3.amazonaws.com (xray-cloud-production.s3.amazonaws.com)|[IP Address]|:443... connected.
HTTP request sent, awaiting response... 400 Bad Request
2023-10-11 14:38:16 ERROR 400: Bad Request.

What do you suggest I do?

1 answer

1 accepted

0 votes
Answer accepted
Gina Ozimisa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2023

ok, I use curl:
curl --location 'https://xray.cloud.getxray.app/api/v2/attachments/....' --header 'Authorization: Bearer $token' --output video.mp4

Suggest an answer

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

Atlassian Community Events