Hi,
I have a curl command which can add a group named "SVC-OneHygieia" to the Administrators role in all jira projects.
curl -D- -u admin:sphere -X POST -H "Content-Type: application/json" --data '{"group":["SVC-OneHygieia"]}' http://10.20.30.40:8080/rest/api/2/project/TEST/role/12345
Now, how to modify this command so that i can add above mentioned group to all the jira projects. I have around 2000+ jira projects.
Note :
Thanks,
Ipsita Dash
Hello @Ipsita Dash
This is a common quesiton on this forum. The way to do it would be to fetch the project list using REST API. Traverse over the list (for loop) and make the REST to add the group to a specific role in the project.
Get all projects
GET /rest/api/2/project
and then traverse over the project keys returned in the response.
Hi Tarun,
Thanks a lot for your solution. For loop thought crossed my mind but i am not sure how effectively it will work for more than 2000 projects.
Also adding 2000+ projects in a for loop will be challenging.
Can you give an example.
Thanks,
Ipsita Dash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.