This article describes a workaround for automated backups for Scroll Wiki Exporter using an HTTP Client.
Overview: Issue a GET or POST request with a few parameters to start the export (basically the request you would send from the HTML UI). As the export works asynchonously, you will need to pool the information from the Longrunningtask-Action.
Step-by-Step Example
- Kick off the export using this URL: [http://k15t.com/demo/pages/com.k15t.scroll/exportScroll.action?pageId=5079057&spaceKey=SCROLLDEMO&key=SCROLLDEMO&title=Home&subtitle=&authorsAsString=&version=13&exportType=com.k15t.scroll.eclipseExporter&generateToc=FALSE&lenient=true&builderMode=0|http://k15t.com/demo/pages/com.k15t.scroll/exportScroll.action?pageId=5079057&spaceKey=SCROLLDEMO&key=SCROLLDEMO&title=Home&subtitle=&authorsAsString=&version=13&exportType=com.k15t.scroll.eclipseExporter&generateToc=FALSE&lenient=true&builderMode=0]v
- Poll every 10 seconds or so this URL:http://k15t.com/demo/longrunningtaskxml.action
- Once you got XML back like this you can download:
<task> <name>Scroll Wiki Exporter: Home</name> <currentStatus>Export completed: <a href="/demo/plugins/servlet/scroll_download/Home-13.pdf"/>Download file</a>.<br/><small>[ <a style="color: gray;" href="/demo/pages/viewpage.action?pageId=5079057">Return to page</a> | <a style="color: gray;" href="/demo/pages/com.k15t.scroll/configureScroll.action?pageId=5079057&spaceKey=SCROLLDEMO&title=Home&subtitle=&authorsAsString=&version=13&exportType=com.k15t.scroll.pdfExporter&themeKey=1270907148616&languageAsString=en&generateToc=true&lenient=true&builderMode=0">Modify export</a> ]</small><br/><div style="background: url(/demo/images/icons/emoticons/information.gif) no-repeat 2px 2px; padding: 4px 4px 4px 20px; border: 2px solid white; width: 90%; margin: 10px auto; text-align:left;">Please review the created document. The document may contain differences to what is displayed by the Confluence wiki.<div></currentStatus> <elapsed>11 seconds</elapsed> <remaining>Unknown</remaining> <percentComplete>100</percentComplete> <isSuccessful>true</isSuccessful> </task>
Check for the last Element <isSuccessful>true</isSuccessful>
- The download link is in the currentStatus element. In this example it is: /demo/plugins/servlet/scroll_download/Home-13.pdf
As Confluence relies on sessions for the longrunning task UI, make sure you use a HTTP client which is session aware.

Add Comment