Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is very easy to get a list of attachments for a single space, list of spaces, or all spaces for a site. This describes how to get attachment information even if are using On Demand version of JIRA. Download users could do something similar using an SQL based query on the JIRA database. The CLI provides the getAttachmentList action that produces a csv file with detail attachment information. There are a variety of subsetting options including by page using search and by attachment information using regex matching. Using --outputFormat 2 provides the most information.

Tip
titleUse 3.5 or above for best results

Release 3.5 contains improvements in this area and is the base for the information on this page.

Example Output

Csv
"Space","Title","Id","Parent Title","Parent Id","File Name","File Size","Content Type","Comment","Creator","Created","Url"
"ACLI","atlassian-cli-examples.png","32178288","Atlassian Command Line Interface","1966101","atlassian-cli-examples.png","20208","image/png","","bswift","2013-01-27","https://bobswiftappfire.atlassian.net/wiki/download/attachments/196610160555464/atlassian-cli-examples.png?version=1&modificationDate=1359302037514&api=v2"
"BCLI","bamboo-cli-banner.png","31457311","Bamboo Command Line Interface","2392068","bamboo-cli-banner.png","97283","image/png","","bswift","2013-01-16","https://bobswiftappfire.atlassian.net/wiki/download/attachments/239206865929504/bamboo-cli-banner.png?version=1&modificationDate=1358375409180&api=v2"

...

No Format
--action runFromList --list ACLI,BCLI --clearFileBeforeAppend --common "--action getAttachmentList --space @entry@ --file attachmentList.csv --append --outputFormat 2 --dateFormat yyyy-MM-dd"

...