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

How to set page Restrictions to users using Confluence APIs?

SubasreeN February 4, 2013

Currently we need to do an audit and restrict some users from viewing certain Pages. How to do it via Confluence Remote API

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
SubasreeN February 10, 2013
Hi Bob, Thanks for your reply. Could you specify the Remote API method available to add page permissions?
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2013

For page permissions it is the setContentPermissions SOAP API.

SubasreeN February 11, 2013

Thanks BOb.. :) You saved my day !

1 vote
SubasreeN February 6, 2013

Hi Guilherme /Bob,

Thanks for the quick response.Appreciate your help. The answer partially answered my query .Actually i want to search pages with certain secret content and if the content exists , i want to restrict those pages from viewing and editing by anyone. ie. the page should not be accessible by anyone .

Actually for search i could find two API (please provide advice if in case there are better options):

1. Searching Using the V2 Search API

2. Search using the REST API

But for making the page inaccessible , i didn't find any confluence API ...Please help.

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2013

Add a page permission to restrict view to an administrator (or you). Administrators can always get access to the data, so I assume you are talking about non-administrators that you need to restrict.

Regarding finding content. Use something like:

confluence --action getContentList --search "secret stuff" --space xxxx

Once you are ready to make a change use something like:

confluence --action runFromContentList --search "secret stuff" --space xxxx --common '--action addPermissions --permissions view --id @pageId@ --userId admin'

Be careful to make sure you are finding the right content first and test everything :).

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2013

I thought I would write up a how to on this: How to find Confluence pages and then do something

1 vote
GuilhermeA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Hello Subasree,

I believe that Bob Swift's CLI plugin might have what you are looking for:

In addition to that you could try to configure your own plugin to use our API:

Hope that this helps you in any way.

Cheers,

Guilherme

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Specifically, the addPermissions action.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events