Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I set Analytics Permissions using REST API ?

David Jansson September 5, 2022

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 

br

/David J

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 5, 2022

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.

David Jansson September 5, 2022

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

 

INSERT INTO
AO_7B47A5_SETTINGS ("ID", "KEY", "CREATED_AT","UPDATED_AT", "VALUE")
VALUES
(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
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events