Hey,
I wand receive a treeview of a space, which has the information of permissions and restrictions of groups and users.
At the moment, I use following REST-API-CALL to create the treeview of the space.
BASEURL /rest/api/space/{spacekey}/content/page?expand=content,ancestor
How I can expand this REST-API-CALL to receive the groups/users which are allowed to see the pages?
Thanks K
@KRAU212, I just saw this and thought I'd share that you can do this via the "expand" query parameter. It took a few iterations to get it working (I found the reported possible expand values rather confusing)!
For example, this will get two levels of children and their restrictions. I too want to walk the entire tree, so I figured that I'd use a mixture of this and recursion.
expand = ''
expand += 'restrictions.read.restrictions.group,'
expand += 'restrictions.update.restrictions.group,'
expand += 'restrictions.read.restrictions.user,'
expand += 'restrictions.update.restrictions.user,'
expand += 'children.page.restrictions.read.restrictions.group,'
expand += 'children.page.restrictions.update.restrictions.group,'
expand += 'children.page.restrictions.read.restrictions.user,'
expand += 'children.page.restrictions.update.restrictions.user,'
expand += 'children.page.children.page.restrictions.read.restrictions' \
'.group,'
expand += 'children.page.children.page.restrictions.update.restrictions' \
'.group,'
expand += 'children.page.children.page.restrictions.read.restrictions' \
'.user,'
expand += 'children.page.children.page.restrictions.update.restrictions' \
'.user,'
Update: I didn't notice that the URL in the original post was /rest/api/space/{spacekey}/content/page, so my suggestion to use "children.page" and "children.page.children.page" (etc.) won't have made sense (I was originally using the /rest/api/content?spaceKey=xxx URL).
However, this still works fine:
expand = ''
expand += 'restrictions.read.restrictions.group,'
expand += 'restrictions.update.restrictions.group,'
expand += 'restrictions.read.restrictions.user,'
expand += 'restrictions.update.restrictions.user,'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you cannot.
I'm trying something similar, but I have to perform another API call for each content id on BASEURL/rest/apí/content/{id}/restriction/byOperation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way now ? I need this , please help me ?
I need to remove all user permissions per page and only add permissions for specific users ? how to do that using REST API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.