-
Suggestion
-
Resolution: Fixed
-
517
-
30
-
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
Hi Everyone,
In Confluence 8.3 we released a new backup and restore experience. At the same time we also shipped a new REST API endpoint for XML exports that allows for the automation of heavy or large site merges and space migrations, making it easier to manage these tasks. You can find this endpoint documented in our Confluence REST API Documentation.
Given this, we have closed this ticket now and created seperate suggestions that allow you to vote for additional REST API endpoints for exports in PDF or HTML format. These tickets are linked below and we encourage you to watch or vote for them if they're of interest to you.
Kind regards,
Jacqueline Bietz
Confluence Data Center
Suggestion
The deprecated XML-RPC and SOAP APIs used to have an exportSpace functionality, however they are deprecated since Confluence 5.5. The REST API functionality does not include an option for creating space/site exports. Even if the exported XML is not transferred via the REST interface, the action could trigger the backup of any given space or the instance to the export directory, optionally providing a download link for it
Workaround
- The Confluence CLI provides such functionality, but it is a paid third-party add-on. The above functionality would be important to automate migration/backup tasks for administrators.
- Although deprecated, you may still use the RPC-API to export the entire Space – see the examples below.
Export a Space to XML.
USRNAME=admin USRPWD=password CONFBASEURL=http://127.0.0.1:8090/confluence SPACE_KEY=SPACEKEY curl -s \ --user $USRNAME:$USRPWD \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -X POST \ -d '{ "jsonrpc" : "2.0", "method" : "exportSpace", "params" : ["'${SPACE_KEY}'", "TYPE_XML", "true"], "id": 7 }' \ ${CONFBASEURL}'/rpc/json-rpc/confluenceservice-v2?os_authType=basic'
Export a Space to HTML.
USRNAME=admin USRPWD=password CONFBASEURL=http://127.0.0.1:8090/confluence SPACE_KEY=SPACEKEY curl -s \ --user $USRNAME:$USRPWD \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -X POST \ -d '{ "jsonrpc" : "2.0", "method" : "exportSpace", "params" : ["'${SPACE_KEY}'", "TYPE_HTML", "true"], "id": 7 }' \ ${CONFBASEURL}'/rpc/json-rpc/confluenceservice-v2?os_authType=basic'
Export a Space to PDF.
USRNAME=admin USRPWD=password CONFBASEURL=http://127.0.0.1:8090/confluence SPACE_KEY=SPACEKEY curl -s \ --user $USRNAME:$USRPWD \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -X POST \ -d '{ "jsonrpc" : "2.0", "method" : "exportSpace", "params" : ["'${SPACE_KEY}'"], "id": 7 }' \ ${CONFBASEURL}'/rpc/json-rpc/pdfexport?os_authType=basic'
Space import
For possible workarounds on importing spaces, please also check this KB article: Confluence Space Import Via Scripting Tools
- has a derivative of
-
CONFSERVER-92629 Add REST API endpoint for generating space exports in PDF format
- Gathering Interest
-
CONFSERVER-92630 Add REST API endpoint for generating space exports in HTML format
- Gathering Interest
- is duplicated by
-
CONFSERVER-55823 Export Space content using API
- Gathering Interest
- relates to
-
CONFCLOUD-40457 Add REST API endpoint for generating space exports
- Gathering Interest
- resolves
-
CONFSERVER-59841 As a Confluence Administrator I would like to import Spaces via REST API
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...