Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I set multiple permissions in a single API call?

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)

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M Community Leader Jan 23, 2022

Hi @Nicholas Shaw 

It's only one permission as per the documentation

Space.png

in this doc

https://developer.atlassian.com/cloud/confluence/rest/api-group-space-permissions/#api-wiki-rest-api-space-spacekey-permission-post

Call multiple API to set multiple permissions for either user or a group

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

43,207 views 30 134
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you