Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-92630

Add REST API endpoint for generating space exports in HTML format

    XMLWordPrintable

Details

    • 1
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Currently we have  REST API functionality for creating space exports only by using XML format. We need to have Rest API to create space/site exports by using HTML format.

      Workaround

      1. 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.
      2. Although deprecated, you may still use the RPC-API to export the entire Space - see the examples below.

      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'
      

      Space import

      For possible workarounds on importing spaces, please also check this KB article: Confluence Space Import Via Scripting Tools

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              d355ed206fc7 Sushree Shailaja Satapathy
              Votes:
              22 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: