-
Suggestion
-
Resolution: Done
Problem Definition
As a Confluence administrator I am able to import a specific space through the admin UI as explained in Restoring a Space.
Importing multiple spaces can take a long time thought the UI, since you need to perform the same task multiple times.
It would be interesting to have an API method to automate this task.
Suggested Solution
Add a REST API method to import a Confluence Space.
Workaround
Although the SOAP-XML API is deprecated, it is still available in Confluence while not all methods are ported to REST.
The Confluence administrator may use the importSpace method to import a Confluence Space.
Below is an example of such an operation using Python:
#!/usr/bin/python from __future__ import with_statement import sys, string, suds, re, os, base64 from suds.client import Client url = 'http://localhost:6733/c733/rpc/soap-axis/confluenceservice-v2?wsdl' client = Client(url) with open('Confluence-space-export-110203-4.xml.zip', 'rb') as myfile: data = myfile.read() encodedFile = base64.b64encode(data) token = client.service.login('admin', 'admin'); outputpath = client.service.importSpace(token, encodedFile); print outputpath;
- is resolved by
-
CONFSERVER-40457 Add REST API endpoint for generating space exports
- Closed
- mentioned in
-
Page Loading...