Update a Portfolio permissions with API

Hi guys,

using web API I am able to create new groups, assign users, create templates, create portfolios, all that good stuff.
However, I can’t find the last bit - how to set permissions to a Portfolio.
Via the portal I can whether configure it manually or assign using a Permission Template (that behaves a bit weird, but would do the job).
Could you please help me to accomplish using web API?


You can use api/permissions/add_user to give individual users access, api/permissions/add_group to give a group access, or api/permissions/apply_template to apply a permissions template. In each case supply the portfolio key as the project key.

FYI, a useful trick for determining what web APIs might be involved in something you want to do is to activate your browser’s developer tools to spy on network calls made, then do that functionality in the SonarQube UI. You’ll then see which API calls are involved.

1 Like

Hi Jeff,

ProjectKey did the trick!

Thanks, sorted!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.