How to get the names of licensed users?

I'm STASH system administrator.

Within administration pages I can see how many licenses are used by our users (http://stash:7990/admin/license).

Where can I see the names of the users that have required a license? (within STASH? REST-API? )

(I currently don't have access to STASH-DB directly, running STASH 2.5.2)

5 answers

1 accepted

2 votes

Hi Johannes,

Please refer to this KB to help install a plugin that can list the licensed Stash users:

https://confluence.atlassian.com/display/STASHKB/Determine+the+users+that+currently+occupy+Stash+license+seats

Thanks,

Gurleen

Thanks for this hint - seems the thing I've been looking for.

Nevertheless I think this should be easier accessible ...

1 vote
Seb Ruiz Atlassian Team Jul 17, 2013

GET

<h6>/rest/api/1.0/admin/permissions/users?filter</h6>

This is a paged API.
Retrieve a page of users that have been granted at least one global permission.

The authenticated user must have ADMIN permission or higher to call this resource.

From our docs.

https://developer.atlassian.com/static/rest/stash/2.5.2/stash-rest.html#idp1471248

Thanks for your fast answer

I thought I searched the API completly - but obviously not. There are far too much API functions ;-) (what's still confusing to me is the variety of namespaces to search for functionality - a plain view of all APIS of all namespaces might be helpful ...)

Doing as Seb suggested, I only get the users which are listed on the "Global permissions" under http://stash:7990/admin/permissions. Currently this are 5 users - and these are the infos I get using the described REST-API

BUT: As we do have allowed AD-authentication the page http://stash:7990/admin/license says that approx 20 licenses of our volume license are used. I want to find out which users do use a license - and this is NOT provided by the described API

Thanks for your fast answer

I thought I searched the API completly - but obviously not. There are far too much API functions ;-) (what's still confusing to me is the variety of namespaces to search for functionality - a plain view of all APIS of all namespaces might be helpful ...)

Unfortunately I considered my question as answered before I tested it.

Perhaps my formulation was not clear enough.

Assumed we have a 100 User license - and currently 50 licenses used. What I wanted to know is which users "eated up" our license pool ... (locally registered user & AD users ...)

Hi Johannes,

There may be a much simpler way than this, but you could write a simple plugin that gets all the users with the LICENSED_USED permission. As far as I can tell this isn't directly exposed by any of our current REST endpoints.

I hope that helps.

Charles

It's a pity, that this functionality is not exposed via REST.

As I'm not a JAVA developer, it's like cracking a nut with a sledgehammer for me to perform this task via plugin.

Hi Johannes,

Just ignore me. I was looking at the wrong code. Seb is quite right. Can you use the permission REST endpoint to fetch all the users that have at least one permission, which is how we do our license check?

Charles

Seb Ruiz Atlassian Team Jul 21, 2013

I'm still not sure why you can't use the REST api though. Seems perfectly suited for it. Any user that is returned by that endpoint has acquired a license.

Doing as Seb suggested, I only get the users which are listed on the "Global permissions" under http://stash:7990/admin/permissions. Currently this are 5 users - and these are the infos I get using the described REST-API

BUT: As we do have allowed AD-authentication the page http://stash:7990/admin/license says that approx 20 licenses of our volume license are used. I want to find out which users do use a license - and this is NOT provided by the described API (running STASH 2.5.2)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

21,994 views 26 11
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you