Hi,
I'm trying to remove page read restrictions with the below REST call.
function removePageRestriction() {
const bodyData = `[{
"content": {
"expanded": true,
"idProperties": {}
},
"operation": "read",
"restrictions": {
"user": {},
"group": {}
}
} ]`;
fetch('https://MYIP/rest/api/content/2367857478/restriction', {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
})
.then(response => { alert( `Response: ${response.status} ${response.statusText}` );
return response.text(); })
.then(text => alert(text)) .catch(err => alert(err));
} But upon execution, I receive an error 405.
Note: the code is taken from https://developer.atlassian.com/server/confluence/rest/v920/api-group-content-restrictions/#api-rest-api-content-id-restriction-put
I have no issues reading the restrictions of that page by using https://developer.atlassian.com/server/confluence/rest/v920/api-group-content-restrictions/#api-rest-api-content-id-restriction-byoperation-get
Has anyone successfully removed page restrictions from confluence pages via REST API?
Or - even better - is there any Confiforms IFTTT method to REMOVE all restrictions from a page (Setting restrictions is easy, but removing?)?
Regards,
Dirk