I am trying to get the list of Permissions and SIDs assigned to the roles in Jenkins.
I am trying to get this from CLI by making curl requests.
I am able to get the List of Roles by calling the following command:
curl http://localhost:8080/manage/role-strategy/strategy/getAllRoles --user admin:11c55c56ceb75ed3b7533cafd5edd3f0ee
for Above Command I am getting this output:
{"admin":[{"type":"USER","sid":"admin"}],"developer":[{"type":"USER","sid":"hiru"},{"type":"USER","sid":"mukund"}]}
I am getting a JSON output in this case, but I also want permissions associated with each role and for that I am calling the following command
curl -XGET 'http://localhost:8080/jenkins/role-strategy/strategy/getRole?type=projectRoles&roleName=admin' --user admin:11c55c56ceb75ed3b7533cafd5edd3f0ee
But I am not getting correct output. I followed this documentation: https://javadoc.jenkins.io/plugin/role-strategy/com/michelin/cio/hudson/plugins/rolestrategy/RoleBasedAuthorizationStrategy.html#doGetRole(java.lang.String,java.lang.String)
Is there any other API from which I can get the Permissions associated with Roles in Jenkins
Thanks.