How do I copy documents to a confluence file list via command line?

Michelle Labonte August 11, 2022

How do I copy documents to a confluence file list via command line? I would like to write a script that copies documents from a linux directory to a confluence file list page. Is there a directory structure behind the scenes, that a confluence file list page reflects?

3 answers

0 votes
Robby Holtmann_IntraFind Software AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 23, 2022

Hi @Michelle Labonte 

Maybe you do not need to maintain duplicate data storage (Linux/Confluence). 

With our solution iFinder Confluence Search, you can make content from other data sources & applications such as Files Share, Jira, Sharepoint, and many more findable with the Confluence search. With the iFinder Search Macro you can even display a predefined search result list directly on a Confluence page.

 These articles may help you:

 Let me know, if you need further information or like to get a demo first.

Best

Robby

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2022

Hi @Michelle Labonte ,

welcome to the Atlassian community!

Confluence attachments are stored in a complex way so you can simply move your attachment in a specific folder in order to have attachments associated to a specific page (here the dts structure managed by Confluence https://confluence.atlassian.com/doc/hierarchical-file-system-attachment-storage-704578486.html).

As suggested by @Florian Bonniec , you need to use REST APIs in order to do that.

Fabio

0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2022

Hi @Michelle Labonte 

 

Not sure why you want to do that but Confluence is a content management tool not a document management tool so it should not be use to store files.

 

If you want to do that I would create a confluence page then write a script that use the Confluence REST API to add attachments (files) to this page and list them with a macro.

https://docs.atlassian.com/ConfluenceServer/rest/7.18.3/#content/{id}/child/attachment-createAttachments

You can also create the page with the rest api.

 

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events