It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can i set page restrictions (read, update) with Confluence Server REST API v6.3+ ?


I previously use the deprecated method with a SOAP client to get, or add, or remove page restrictions for given groups or users. Everything seems normal until i get a risky behaviour when i add a page restrictions with a more complex vector permission, that combines both groups and users. Like this :

var vectorPermission = {
"permission_1": {
"type": "View",
"groupName": "group1",
"userName": null
"permission_2": {
"type": "View",
"groupName": "group2",
"userName": null
"permission_3": {
"type": "View",
"groupName": null,
"userName": "user1"

So i choose to give up this method and use REST API approach, but i can't find a method to add, update or remove page restrictions with Confluence Server REST API. The method seems to be only exists with Confluence Cloud REST API (

And the "experimental API" approach doesn't work in Confluence 6.3+

PUT https://confluence/rest/experimental/content/<id>/restriction/byOperation/read/user?userName=billgates

 If you have an idea, tank you in advance,

1 answer

1 vote
viqueen Atlassian Team Dec 28, 2017

From what I see, this feature is unfortunately not supported yet on Confluence Server.

We only support GET and PUT for /content/<id>/restriction/byOperation/<operationKey>/user

In this case PUT will update (and replace the restrictions, which is not your use case)

The experimental api does have a POST method applied to the following resource

/content/<id>/restriction and the payload is similar to what the GET method would return

* Accepts same input format as the response of GET to the same resource would return.
* <p>
* E.g.
* <div class="exampleRequests">
* <p>Example request (simplified)</p>
* <pre>{@code
* [
* {
* "operation": "update",
* "restrictions":
* {
* "user": [
* {
* "type": "known",
* "username": "admin"
* }
* ]
* }
* }
* ]
* }</pre>

To use with care, as it may change once it is promoted out of experimental.

Hope this helps 



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  ?

+1 for this question


The endpoint mentioned in the comment from @viqueen doesn't even exist in the API.




With a PUT, I get a 404 on this endpoint.

'read' :{
'operation': 'read',
'restrictions': {
'user': [
'type': 'known',
'username': 'johndoe'

How are we supposed to restrict page read access to a specific user in an automated way?

Since atlassian team cant be bothered to reply....let me do their job for them

url = '{id}/restriction'
headers = { "Accept": "application/json", "Content-Type": "application/json" }
payload = json.dumps( [
"operation": "update",
"restrictions": {
"user": [
{ "type": "known",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>"
"group": [
"type": "<string>",
"name": "<string>",
] )

r = requests.put( url, verify=False, data=payload, headers=headers, auth=(username, passwd) )

 Take a look at for reference...try to do a get permission on the page first to understand what kinda operation there not use administer as the operation...that's for cloud

This is for confluence cloud yes? I think the og answer asked for a server solution, by any means does this work for server as well as cloud?


EDIT: just tested it with "experimental" , works like a charm.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

109 views 3 7
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you