Download attachments and page content from Confluence

For a project there is a need to move all the attachments in Confluence, including the page content, in a remote repository.

Confluence offers different API and the XML-RPC API can be still used. The API do not allow to download all the attachments in once but only page by page therefore the need for this python script which:

  1. Creates a folder for each page which includes
    1. the html export of the page
    2. all the attachments of the page
  2. Once all the pages are saved, it moves all the folders in the same hierarchical structure of the space

You can find the code my GitHub repository:

https://github.com/EmidioStani/confluence_attachments

Main inspiration came from: https://answers.atlassian.com/questions/114490/how-to-get-all-attachments-under-a-space-via-rest-api

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s