Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I wanted to assign restrictions on confluence page using API. But facing error. Any solutions?

Nikhil Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 19, 2022

I created a new page on confluence to test granting permissions through api.

The page id is 930XXXXX.

Now using GET request on the url:

https://<my-org-domain>/confluence/rest/experimental/content/930XXXXX/restriction/

I retrieved the permissions info of the page.

Then I created a new payload using the information from the page and appending new user info (type, username and userKey) at the relevant position to grant certain permission. While doing that, I am facing 500 : Internal Server Error. 

The payload was of the form:

[
{
"operation": "update",
"restrictions": {
"user": [
{ "type": "known", 
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>"
}],
"group": [
{
"type": "<string>",
"name": "<string>",
}]
}
}
]

Any solution or fix would be highly appreciated. The confluence version is 7.13.0

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events