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:
- Creates a folder for each page which includes
- the html export of the page
- all the attachments of the page
- 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:
Main inspiration came from: https://answers.atlassian.com/questions/114490/how-to-get-all-attachments-under-a-space-via-rest-api