I’ve got a Python script that is creating/updating pages on Confluence Cloud via the REST API. The account being used to perform the changes is a space admin.
I’m trying to extend the script so that it applies view restrictions to each page after it has been saved to Confluence. However, I am getting the error “Not enough permissions to alter ContentRestrictions” when I try to do this.
body = [
{
"operation": "read",
"restrictions": {
"user": [
{
"type": "known",
"accountId": bot_id
}
],
"group": [
{
"type": "group",
"name": "employees"
},
{
"type": "group",
"name": group_name
}
]
}
},
{
"operation": "update",
"restrictions": {
"user": [
{
"type": "known",
"accountId": bot_id
}
],
"group": []
}
}
]
where bot_id is retrieved from GET /rest/api/user/current
with the same authentication.
The weird thing is that if I do this using my own account credentials then it works but I’m struggling to find where I have more power/permissions than the bot account.
Thanks.