How to add members to a group in Bamboo using the REST API
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This document has information on how to add members to a group in Bamboo using the REST API.
Environment
All supported versions of Bamboo.
Solution
Below is the REST API endpoint that can be used to add members to the group in Bamboo:
curl -k -u username:password \
-H 'Content-type: application/json' \
-H 'Accept: application/json' \
-d '["<user_name_list>"]' \
-X POST "${Bamboo_Base_URL}/rest/api/latest/admin/groups/${Groupname}/add-users"
Replace username and password with your admin user credentials
Replace <user_name_list> with the list of users to add.
Replace ${Bamboo_Base_URL} with your Bamboo base URL.
Replace ${Groupname} with the group name to which the users list needs to be added
Example:
curl -k -u bamboo:admin123 \
-H 'Content-type: application/json' \
-H 'Accept: application/json' \
-d '["user5","user1","user2"]' \
-X POST http://myBamboo:8085/rest/api/latest/admin/groups/bamboo-localtest/add-users