• 517
    • 30
    • 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.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      Atlassian Update – 18 October 2023

      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
      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 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

            [CONFSERVER-40457] Add REST API endpoint for generating space exports

            Renata Dornelas made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 524513 ]
            Irina Tiapchenko made changes -
            Link Original: This issue relates to CONFSERVER-59841 [ CONFSERVER-59841 ]
            Irina Tiapchenko made changes -
            Link New: This issue resolves CONFSERVER-59841 [ CONFSERVER-59841 ]
            Irina Tiapchenko made changes -
            Link New: This issue relates to CONFSERVER-59841 [ CONFSERVER-59841 ]
            Cihan made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 899360 ]
            Cihan made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 869781 ]
            Charlie Marriott made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 849098 ]

            I would like to mention the business case of this requirement to ensure we are all on the same page.

            We store our policies, standard operation procedures, knowledge bases and other important documentation within Confluence. An incident on Atlassian Cloud products, including Confluence, is one of our incident scenario within our plans and risk registries. Unfortunately, Atlassian does not allow a plan B for disaster scenarios where this risk is obvious. The lack of the feature is sadly puts us in a position where we cannot fully rely on Confluence enforcing us either to use it as a secondary source or leave the product if possible.

            Allowing us to backup our documentation to use offline in case of the incidents is a core functionality, not an afterthought.

             

            I added this comment, even though the ticket is closed, as a reminder for all derivatives of this ticket.

            zafer.balkan added a comment - I would like to mention the business case of this requirement to ensure we are all on the same page. We store our policies, standard operation procedures, knowledge bases and other important documentation within Confluence. An incident on Atlassian Cloud products, including Confluence, is one of our incident scenario within our plans and risk registries. Unfortunately, Atlassian does not allow a plan B for disaster scenarios where this risk is obvious. The lack of the feature is sadly puts us in a position where we cannot fully rely on Confluence enforcing us either to use it as a secondary source or leave the product if possible. Allowing us to backup our documentation to use offline in case of the incidents is a core functionality, not an afterthought.   I added this comment, even though the ticket is closed, as a reminder for all derivatives of this ticket.

            So the new REST endpoints only work for Confluence Server? Not Cloud? We have Cloud and want to be able to generate the export as well.

            James Flores added a comment - So the new REST endpoints only work for Confluence Server? Not Cloud? We have Cloud and want to be able to generate the export as well.
            Jacqueline Bietz made changes -
            Description Original: {panel:bgColor=#e7f4fa}
            *NOTE:* This suggestion is for *Confluence Server*. Using *Confluence Cloud*? [See the corresponding suggestion|http://jira.atlassian.com/browse/CONFCLOUD-40457].
            {panel}
            h5. Suggestion

            The deprecated [XML-RPC and SOAP APIs|https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis] used to have an {{exportSpace}} functionality, however they are deprecated since Confluence 5.5. The [REST API|https://developer.atlassian.com/confdev/confluence-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
            h5. Workaround
             # The [Confluence CLI|https://marketplace.atlassian.com/plugins/org.swift.confluence.cli/cloud/overview] 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|https://confluence.atlassian.com/conf613/enabling-the-remote-api-964961434.html] to export the entire Space – see the examples below.
             ** [Confluence JSON-RPC APIs|https://developer.atlassian.com/server/confluence/confluence-json-rpc-apis]
             ** [Remote Confluence methods|https://developer.atlassian.com/server/confluence/remote-confluence-methods/]
             ** [Remote API Specification for PDF export|https://developer.atlassian.com/server/confluence/remote-api-specification-for-pdf-export/]

            h4. Export a Space to XML.
            {code:java}
            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'
            {code}
            h4. Export a Space to HTML.
            {code:java}
            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'
            {code}
            h4. Export a Space to PDF.
            {code:java}
            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'
            {code}
            h4. Space import

            For possible workarounds on importing spaces, please also check this KB article: [Confluence Space Import Via Scripting Tools|https://confluence.atlassian.com/confkb/confluence-space-import-via-scripting-tools-1041075950.html]
            New: {panel:bgColor=#e7f4fa}
            *NOTE:* This suggestion is for {*}Confluence Server{*}. Using {*}Confluence Cloud{*}? [See the corresponding suggestion|http://jira.atlassian.com/browse/CONFCLOUD-40457].
            {panel}
            {panel:title=Atlassian Update – 18 October 2023|borderStyle=solid|borderColor=#deebff|titleBGColor=#deebff|bgColor=#deebff}
            Hi Everyone, 

            In Confluence 8.3 we released a [new backup and restore experience|https://confluence.atlassian.com/doc/confluence-8-3-release-notes-1236928237.html]. 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|https://docs.atlassian.com/ConfluenceServer/rest/8.4.2/#api/backup-restore].

            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
            {panel}
            h5. Suggestion

            The deprecated [XML-RPC and SOAP APIs|https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis] used to have an {{exportSpace}} functionality, however they are deprecated since Confluence 5.5. The [REST API|https://developer.atlassian.com/confdev/confluence-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
            h5. Workaround
             # The [Confluence CLI|https://marketplace.atlassian.com/plugins/org.swift.confluence.cli/cloud/overview] 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|https://confluence.atlassian.com/conf613/enabling-the-remote-api-964961434.html] to export the entire Space – see the examples below.
             ** [Confluence JSON-RPC APIs|https://developer.atlassian.com/server/confluence/confluence-json-rpc-apis]
             ** [Remote Confluence methods|https://developer.atlassian.com/server/confluence/remote-confluence-methods/]
             ** [Remote API Specification for PDF export|https://developer.atlassian.com/server/confluence/remote-api-specification-for-pdf-export/]

            h4. Export a Space to XML.
            {code:java}
            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'
            {code}
            h4. Export a Space to HTML.
            {code:java}
            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'
            {code}
            h4. Export a Space to PDF.
            {code:java}
            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'
            {code}
            h4. Space import

            For possible workarounds on importing spaces, please also check this KB article: [Confluence Space Import Via Scripting Tools|https://confluence.atlassian.com/confkb/confluence-space-import-via-scripting-tools-1041075950.html]

              03cb0c04aa4f Irina Tiapchenko
              pkoczan Peter Koczan (Inactive)
              Votes:
              373 Vote for this issue
              Watchers:
              216 Start watching this issue

                Created:
                Updated:
                Resolved: