/
How to add the view space permission in bulk to a group using Confluence CLI
How to add the view space permission in bulk to a group using Confluence CLI
This article explains how to add the view space permission in bulk to a specific group using Confluence Command Line Interface (CLI).
Instructions
Use the addPermissions action to add space permission to a specific group for multiple spaces.
- Create a CSV file with the list of space keys as required with column name as space.
Execute the following CLI command to add the VIEW permission for all the spaces mentioned in the CSV file for a specific group:
--action runFromCsv --file "space.csv" --common "--action addPermissions --permissions "viewspace" --group "supportgroup"" --continue
You can verify that the View permission is now added to the specified space(s) for the specified group in the Permissions page. The result of the command given in this example is as shown:
The given CLI command has the following parameters:
- permissions: value specifies the type of permission.
- group: value specifies the group name.
- common: is a common parameter string added to all run actions.
- continue: is used to continue processing even after errors are encountered for run actions.
- Valid values for the permissions parameter are:
- viewspace
- editspace
- setpagepermissions
- removepage
- editblog
- removeblog
- comment
- removecomment
- createattachment
- removeattachment
- exportspace
- The CLI action is to be tested in a non-production environment before implementing it in the production environment.
Related content
Confluence Command Line Interface
Confluence Command Line Interface
Read with this
How to replace group permissions with individual permissions in spaces using Confluence Command Line Interface (CLI)
How to replace group permissions with individual permissions in spaces using Confluence Command Line Interface (CLI)
More like this
Installation and Use
Installation and Use
Read with this
addGroupToSpacePermission
addGroupToSpacePermission
More like this
CLI Client Installation and Use
CLI Client Installation and Use
Read with this
addGroupToSpacePermission routine
addGroupToSpacePermission routine
More like this