Enterprise Theme for Confluence
Breadcrumbs

How to set the design for multiple spaces

The following script can be used to set the design in multiple spaces

#!/usr/bin/env bash
declare -a spaceKeys=("SADA" "ds")
declare -a url="http://localhost:6700/confluence/spaces/plugins/designs/dosetdesign.action"
declare -a designKey="ch.bitvoodoo.confluence.plugins.customer:design"
declare -a username="admin"
declare -a password="admin"

for spaceKey in "${spaceKeys[@]}"
do
 echo "Set for space $spaceKey"
 curl -H "X-Atlassian-Token: no-check" -H "Content-Type: application/x-www-form-urlencoded" -d "spaceKey=${spaceKey}&designKey=${designKey}" -X POST -u ${username}:${password} ${url}
done