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 Champion
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
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events