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

Given the /download link provided by _links of an attachment how to access data using curl

Emanuele Ruffaldi April 20, 2018

 

I have obtained a /download link as follows by using the REST API with /content/.../child/attachment

curl --user USER:PASS --url 'https://SERVER.atlassian.net/download/attachments/...

I have used the API token for the REST API request but which user an password should I try for the /download request (is the main user and password?)

 

Best,

Emanuele

 

2 answers

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 20, 2018

Hi @Emanuele Ruffaldi,

 

Can you confirm you use the email address instead of the API token to authnticate?

This can indeed be the same as:

https://community.atlassian.com/t5/Jira-questions/Cannot-make-a-JIRA-REST-API-request-returning-HTML/qaq-p/777618

 

Also, if you already use the email address, you may have to add the Curl argument to follow redirect. E.g.

curl -D- -L -u EMAIL:API_TOKEN -X GET https://xxx.atlassian.net/..... 

 

Let me know if this helps.

 

Cheers,
Dario

Emanuele Ruffaldi April 23, 2018

I missed the -L option.

Thanks

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2018

You are very welcome! :) 

 

Ciao,
Dario

0 votes
Emanuele Ruffaldi April 20, 2018

Solved

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events