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