How to read all users in a group using REST API in on demand Confluence?


I cannot find the corresponding API here:

PS The goal is to check if a user is granted with the update restriction on a page.

As far as I have understood, you can use the following REST API call to get a list of restrictions for a specific page


In order to see if the user can edit the page, you need to check if the user is directly allowed or if he belong to any of the groups having the update restriction. Is this correct or there is a smarter way?

5 answers

There is no way to get the users of a group in Confluence (see In Connect, is it possible to see a user's groups and/or permissions?). @Travis Smith suggested that I submit an improvement request, but I didn't do it because I expect a "What is your usecase"-kind-of-response. If you do submit one, I'll upvote you!

The usecase is this one:

  • we have a connect dynamic macro from which we can launch a custom editor (i.e. without entering the edit mode of the page). 
  • we would like to hide the edit button in case the user is not granted with update restriction.


PS By the way, is there already an issue in the here that I can watch?

Hi Salvatore,

I'm not aware of any method using the REST API (actually, there's ui/1.0/content/{id}, but that's not on the Connect whitelist), but there is a way by using the JSON-RPC API.  More information can be found here:!topic/atlassian-connect-dev/Pe6U-5HYFUs

You have to make two calls, one to get the page permissions and one to get the space permissions.  You could substitute /rest/api/content/{contentID}/restriction/byOperation for the first one (getPagePermissions), but you still need to run the RPC call to get space-level permissions (getPermissions).

However, since it's possible for there to also be group restrictions, I'm not sure how you'd get around that issue...

Hi Salvatore,

We've recently added an "operations" expansion on the /rest/api/content/{contentID} resource, which I think will suit your use case of determining whether to show the edit button:


This will add an "operations" property to the response, like this:

    id: "12345",
    type: "page",
    title: "My page",
    operations: [
            operation: "read",
            targetType: "page"
            operation: "update",
            targetType: "page"
            operation: "delete",
            targetType: "page"

This expansion shows the operations the requesting user is allowed to perform, taking into account both permissions and content restrictions.

So if the "update" operation is present, then the requesting user is able to edit the page.

It can be used on all Confluence resources that return Content and take an "expand" parameter, and is currently available for Page, BlogPost and Comment content types, with others to follow.

Wow, that's great! Looking at the documentation I see that it has been updated, but without this answer I wouldn't have thought to look. Would it be possible to include this sort of information in the release notes next time (or can this information be found somewhere else)?

Stephen - we intentionally hadn't made a big deal of this yet, as it's very new and only recently supported enough built-in content types to be widely useful. It will likely get talked about some more soon :)

Hi Nick,
Thanks a lot, that's exactly what I was looking for!


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,477 views 114 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you