I am attempting to set permissions for spaces, and want to use a single API call to set all the permissions I want at once.
Space Permission API
Whenever I try building my payload though, only one permission is set, and it's always the last permission in the list.
I've tried both the below method, and just using multiple operation objects, and both have the same problem.
I could of course use a single call per permission, but I have hundreds of spaces, and want to set 3-5 permissions per space, that's a *ton* of calls.
Here's the python I've got:
payload = json.dumps({
"subject": {
"identifier": <GroupID>,
"type": "group"
},
"operation": {
"key": "read",
"target": "space",
"key": "delete",
"target": "space",
"key": "create",
"target": "comment",
"key": "create",
"target": "attachment"
},
"_links": {}
})
response = requests.request("POST", url, headers=ConfluenceVars.headers, data=payload, verify=False)