Skip to end of banner
Go to start of banner

How to give Anonymous access to a confluence space 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 7 Next »

This article gives step by step instructions on how to give anonymous access to Confluence access to the Confluence CLI app.

Instructions

Use addPermissions action to add the permissions to the Confluence spaces along with the userId parameter. 

To  give Anonymous access for a single space:

  • Ensure that the CLI client file is updated with the required information. Run the following CLI action to add the view space permissions for the userId anonymous in a space: 

    --action addPermissions --space ZCLI --permissions VIEWSPACE --userId anonymous


To  give Anonymous access for multiple spaces:

  • In order to add permissions for multiple spaces, you would need to create a CSV file with a column name as space as follows. 

    Once you have the CSV file, you can execute the following CLI command to add the permissions for multiple spaces. 

    --action runfromCSV --file "addpermissionspace.csv" --common "--action addPermissions --permissions VIEWSPACE --userId anonymous --continue"


    The output of the above CLI command for space will be.




The parameters used in the above actions are:

  • --space value refers to the space key.
  • --permissions value refers to comma separated list of space permissions.
  • --userId value refers to user id of the user whom you want to assign the permissions. 
  • --file value refers to path to file based content.



  • Valid space permissions are: [VIEWSPACE, REMOVEOWNCONTENT, EDITSPACE, REMOVEPAGE, EDITBLOG, REMOVEBLOG, CREATEATTACHMENT, REMOVEATTACHMENT, COMMENT, REMOVECOMMENT, SETPAGEPERMISSIONS, REMOVEMAIL, EXPORTSPACE, SETSPACEPERMISSIONS]. Group or userId can also be a comma separated list of groups and userIds. Space permission support not available for Cloud.






  • No labels