This article presents step by step instructions on how to bulk delete spaces in Confluence using the Confluence CLI app.
Instructions
Use removeSpace action along with runfromCsv to bulk remove space to bulk remove spaces from the Confluence.
Bulk delete spaces in Confluence:
...
In order to remove spaces in bulk, we need to first create a csv file with the space keys. Execute the following command using getSpaceList action.
Code Block theme Midnight --action getSpaceList --file "
...
Code Block | ||
---|---|---|
| ||
--action runFromCsv --file "file.csv" --common "--action removeSpace" --continue |
In order to remove multiple spaces at a time, you need to create a CSV file with a single column named space as follows:
...
spacelist.csv"
...
Execute the following CLI action align with the runFromCsv action to delete spaces. Ensure that the spacelist.csv has only space keys with the column name being, space.
Code Block theme Midnight --action runFromCsv --file "
...
spacelist.csv" --common "--action removeSpace" --continue
Sample CSV file
The parameters used in the above actions are:
- --space value refers to the space key.
- --remove value refers to comma-separated list of space permissions.
- --Common parameter string added to all run actions.
- --continue value processing even after errors are encountered for run actions. Also used for some action to ignore certain errors like not found errors on remove actions.
- --file value refers to path to file based content.
Info |
---|
|