You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
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)
It's only one permission as per the documentation
in this doc
Call multiple API to set multiple permissions for either user or a group
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can not set multiple keys with same string in dictionary object , it will overwrite and use only one unique. In order to send multiple operation calls in one , just pass multiple operation dictionary object in the same call using "list of dictionary". Please refer below.
operations": [ { "key": "read", "target": "page"},
{ "key": "create", "target": "page"}
]
Same has been described in the docs also , although you need to use different endpoint also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.