Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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!
Oct 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!
Oct 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
Site Admin
TAGS
AUG Leaders

Atlassian Community Events