How to get list of projects without admin users using API?

Must-share information (formatted with Markdown):

  • Sonarqube 8.9

I tried below but no linkage of projects and users

Even tried below api requests but they are not working in 8.9 version.<KEY><KEY>&permission=issueadmin<KEY>&permission=issueadmin&permission=scan

Please suggest.

Hey there.

What do you mean they “aren’t working”?

What happens when you try to use them?

Hi, can you please suggest for this question also How to get list of projects without admin users using API? - Get help / SonarQube - SonarSource Community

Tested on 8.9(.4 and .6) EE

If you want to get all users for a specific project you can do this (by selecting all permissions):
curl 'https://SONAR_HOST/api/permissions/users?projectKey=PROJECT_KEY&permission=admin&permission=issueadmin&permission=profileadmin&permission=gateadmin&permission=portfoliocreator&permission=provisioning&permission=scan&permission=user'
But it doesn’t provide the associated groups (which include other users).

For the groups I try something like:
curl 'https://SONAR_HOST/api/permissions/groups'
But I dont find a way to specify the project and like that we don’t know the mapping.
After some dummy tests:

  • projectKey: no filter
  • projectName: no filter
  • project: no filter
  • projectId: Project Id ‘xx’ not found. Interesting
  • projectKey and projectId: Project id or project key can be provided, not both. Interesting

So clearly we can success only if these 2 paths are documented :innocent:
(Knowing why it is not provided in the API doc can be a plus ^^)

Hey there.

You can find documentation for these Web APIs by clicking the Show Internal API button in the Web API documentation.

I found it :confused:
same as for the users and so groups must select all permissions to be sure to get all groups associated to the project.
Thanks! (for me we can close it :stuck_out_tongue: )