Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How i can get users for bamboo plan via rest api? Edited

How can i get users for bamboo plan via rest api? i need list of users that have permissions for plan.

1 answer

0 votes

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:

  • Plan admin to user brosa.
  • View access to the bamboo-users group.
  • View access to logged in users.
  • View access to anonymous users.

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:

  • PRINCIPAL (user)
  • GROUP_PRINCIPAL (group)
  • GRANTED_AUTHORITY (role)

The following user_or_group_or_role:

  • username
  • group name
  • logged in users
  • anonymous access

Finally, the following permission_levels:

  • 1: View
  • 2: Edit
  • 64: Build
  • 128: Clone
  • 16: Admin
Bruno Rosa Atlassian Team Oct 11, 2017

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:

  • http://localhost:8085/rest/api/latest/permissions/plan/<PLAN_KEY>/users

You can also use the following to get a list of groups with access to a particular plan:

  • http://localhost:8085/rest/api/latest/permissions/plan/<PLAN_KEY>/groups

This is all available here: https://docs.atlassian.com/bamboo/REST/6.2.1/#d2e337

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

179 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you