Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do I set Analytics Permissions using REST API ?


As system admin I need to update all space permissions to exclude a space from Analytics unless Space admins explicitly have included it. 

When global permission grants access to analytics a user can get insights of any space that the user has access to. Default analytics setting on space level is "No restrictions", I would like to change that on existing spaces.

Use case: A manager could be monitoring the users visiting a page in the HR space describing how to apply for parental leave. Persons visiting the page might be excluded from promotion considerations if the manager suspects they could go on extended leave in the near future. 

We have hundreds of spaces in our Confluence instance, manual updates are not feasible 

Any suggestion is appreciated 


/David J

1 answer

0 votes

The REST API does not yet allow for this administrative task.  I'm afraid your admin is going to have to slog through the permissions for every space.

How bad would it be shut down confluence and run something like:


(n,'SPACE_RESTRICTIONS_<spacekey>', 1662374915802, 1662375021342, '{""userGroups"":[{""groupName"":""confluence-administrators"",""useAnalytics"":true}],""users"":[]}'),
(n+1,'SPACE_RESTRICTIONS_<spacekey>', 1662374915802, 1662375021342, '{""userGroups"":[{""groupName"":""confluence-administrators"",""useAnalytics"":true}],""users"":[]}'),
(n+2,'SPACE_RESTRICTIONS_<spacekey>', 1662374915802, 1662375021342, '{""userGroups"":[{""groupName"":""confluence-administrators"",""useAnalytics"":true}],""users"":[]}');

+ Update AO_7B47A5_SETTINGS_ID_seq with latest entry

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events