How to add members to a group in Bamboo using the REST API

Still need help?

The Atlassian Community is here for you.

Ask the community

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"

 (info) Replace username and password with your admin user credentials
 (info) Replace <user_name_list> with the list of users to add.
 (info) Replace ${Bamboo_Base_URL} with your Bamboo base URL.
 (info) 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

Last modified on Jan 13, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.