How can i get users for bamboo plan via rest api? i need list of users that have permissions for plan.
hey Igor, there's no REST endpoint available to get plan permissions in Bamboo. However, you can do this from the database using the following SELECT query:
select AE.TYPE,
AE.SID USER_OR_GROUP_OR_ROLE,
AE.MASK PERMISSION_LEVEL
from BUILD B
join ACL_OBJECT_IDENTITY AOI
on AOI.OBJECT_ID_IDENTITY = B.BUILD_ID
join ACL_ENTRY AE
on AE.ACL_OBJECT_IDENTITY = AOI.ID
where B.BUILD_TYPE = 'CHAIN'
and B.FULL_KEY = '<PLAN_KEY>';
Please replace <PLAN_KEY> with the actual plan key.
Let me give you an example. I have granted the following permissions to my plan:
This is how it looks like when I run that SQL statement:
| type | user_or_group_or_role | permission_level |
| PRINCIPAL | brosa | 2 |
| PRINCIPAL | brosa | 1 |
| PRINCIPAL | brosa | 16 |
| PRINCIPAL | brosa | 128 |
| PRINCIPAL | brosa | 64 |
| GRANTED_AUTHORITY | ROLE_USER | 1 |
| GRANTED_AUTHORITY | ROLE_ANONYMOUS | 1 |
| GROUP_PRINCIPAL | bamboo-users | 1 |
Following the example above, we have the following types:
The following user_or_group_or_role:
Finally, the following permission_levels:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By the way, what I mentioned above is for Bamboo < 6.2 (e.g. 5.10, 5.13, 5.15, 6.1, etc). Multiple changes have been introduced to Bamboo 6.2 in terms of permissions (as seen here: https://confluence.atlassian.com/bamboo/bamboo-6-2-release-notes-938641951.html), including REST endpoints to query plan permissions.
For example, you can get a list of users that have been granted access to a specific plan using the following REST endpoint:
You can also use the following to get a list of groups with access to a particular plan:
This is all available here: https://docs.atlassian.com/bamboo/REST/6.2.1/#d2e337
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.