The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How do I produce a list of all attachments and the pages they are attached to?

Jason Finns
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!
September 23, 2015

I need to produce a list of all attachments in Confluence, and the pages they are attached to.  I am attempting to pull this information from the database, but cannot see a way to join the ATTACHMENTS table to the CONTENT table.

I cannot use the listing of attachments in the Content Tools section of a space, because I need this information exported to Excel.

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

3 votes
Luiz Maia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 24, 2015

Hi Jason,

In fact I also don't see any method to join the Attachments and Content tables from the database, however, this tables have been merged since Confluence 5.7. Now attachments are listed on the "contenttype" column from the Content table, so you would be able to query all content where the contenttype column is an attachment. Below is an example query for that:

SELECT * FROM CONTENT WHERE contenttype LIKE 'ATTACHMENT'

I'm not sure if it would be feasible for you to upgrade Confluence to 5.7 or later, however it's the only workaround I see for that.

Thanks.

Regards,
LM

0 votes
Bob Swift
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 24, 2015

You can use the Confluence Command Line Interface (CLI) to produce lists of attachments in CSV format that you can import into Excel. Use the getAttachmentList action.

0 votes
Jason Finns
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!
September 24, 2015

Thank you for your answer Luiz.  Unfortunately, I cannot upgrade my Confluence instance right now, so it appears that I am out of options, which is dissappointing.  I appreciate your reply though.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events