Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Download JIRA attachment files with Python

Mustafa Mousa
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!
December 21, 2022

I need help with downloading Jira attachment files with Python

1 answer

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 26, 2022

Hi @Mustafa Mousa -

Can you provide a little more context?

Is this part of some kind of build script/automation? Do you want all the attachments if the script is given the input of a single issue key? Or are you trying to do a bulk download of attachments for the whole server or a single project?

And have you already tried writing a script and are running into issues?

Here's a good example using the python requests module (not any Jira-specific modules):

http://migueleonardortiz.com.ar/python/download-jira-attachments-with-python/1334

And while this tutorial from @Ravi Sagar _Sparxsys_ is Cloud-specific, the general idea also applies to Jira Server. You could get the list of attachments from Jira's REST API by hitting a URL like https://yourjiraserver/rest/api/2/issue/ISSUE-24090 and then parse the JSON to find attachments and get the URLs for each attachment for downloading.

Suggest an answer

Log in or Sign up to answer