Skip to end of banner
Go to start of banner

How to add view space permission in bulk to a group using Confluence Command Line Interface (CLI)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This article explains how to add 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. 

  1. Create a CSV file, with the list of space keys as required, with column name being space.
  2. Execute the following CLI command to add VIEW permission for all the spaces mentioned in the csv file for a group. 

    --action runFromCsv --file "space.csv" --common "--action addPermissions --permissions "viewspace" --group "supportgroup"" --continue
    Once the above command is executed,  View permission is added to the space(s) for the specified group, as shown below.



The above cli command has the following parameters:

  • permissions:: value specify the type of permission. 
  • group: value specify the group name.
  • common: Common parameter string added to all run actions.
  • continue: Continue processing even after errors are encountered for run actions. 


  • Valid space permissions 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.
  • No labels