Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The builtin Script "Copy Space" can be used with REST:

Kodeblok
titlecopySpace.sh
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
titlecopySpace.json
{"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