Reputation: 108
I'm trying to find a list of users for a specific project (by projectKey) who possess the issueadmin permission. I've found a documented API that gets me pretty close:
api/permissions/search_project_permissions
but the response that I get back only has summary information: counts of groups/users for each permission type.
search_project_permissions response
Does anybody know if there's a way to get to the login details for the users?
Upvotes: 3
Views: 4301
Reputation: 1277
just noticed in Sonarqube v6.7 it works as follows:
https://<SQserver>/api/permissions/users?projectKey=<KEY>
https://<SQserver>/api/permissions/users?projectKey=<KEY>&permission=issueadmin
https://<SQserver>/api/permissions/users?projectKey=<KEY>&permission=issueadmin&permission=scan
All possible permissions are (reg. Browse, See Source Code, Administer Issues, Administer and Execute Analysis):
Upvotes: 3
Reputation: 56
Those looking for UI to API Mapping:
[UI]Browse == [API]user
[UI]See Source Code == [API]codeviewer
[UI]Administer Issues == [API]issueadmin
[UI]Administer Security Hotspots == [API]securityhotspotadmin
[UI]Administer == [API]admin
[UI]Execute Analysis == [API]scan
Upvotes: 0
Reputation: 22804
There is an "internal" web service (meaning it could change without notice!) that does this. You'll use it like so:
http://myserver.myco.com/api/permissions/users?projectId=[project guid]&permission=issueadmin
In Web API interface use the "Show Internal API" checkbox at the top of the left column to see it.
Upvotes: 5