The builtin Script "Copy Space" can be used with REST:
Kodeblok |
---|
|
curl -u admin:Welcome1 -H "Content-Type: application/json" -H "X-Atlassian-Token: nocheck" -d @copySpace.json http://confluence.server.dk/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.confluence.admin.CopySpace |
The Json Payload:
Kodeblok |
---|
|
{"FIELD_SOURCE_SPACE_KEY":"TEST","FIELD_TARGET_SPACE_KEY":"TEST2","FIELD_TARGET_SPACE_NAME":"A copy of TEST","canned-script":"com.onresolve.scriptrunner.canned.confluence.admin.CopySpace"} |
See the Jira Copy Project here