Is there any way to get the maximum number of users of the current license?

Jesper Eneberg January 23, 2017

Can I get the maximum of users until the license runs out via API or SQL? I would like to use this together with the stat of number of users I currently have to easily monitor when we're going to run out of licenses.

4 answers

1 accepted

4 votes
Answer accepted
Alexey_Efimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2017

Use GET https://bitbucket.acme.com/rest/api/1.0/admin/license

{
  "creationDate": 1464703200000,
  "purchaseDate": 1464184800000,
  "expiryDate": 1495720800000,
  "numberOfDaysBeforeExpiry": 121,
  "maintenanceExpiryDate": 1495720800000,
  "numberOfDaysBeforeMaintenanceExpiry": 121,
  "gracePeriodEndDate": 1495720800000,
  "numberOfDaysBeforeGracePeriodExpiry": 121,
  "maximumNumberOfUsers": 1000,
  "unlimitedNumberOfUsers": false,
  "serverId": "XXXX-XXXX-XXXX-XXXX",
  "supportEntitlementNumber": "SEN-1234567",
  "license": "***",
  "status": {
    "currentNumberOfUsers": 859,
    "serverId": "XXXX-XXXX-XXXX-XXXX"
  }
}
Jesper Eneberg January 24, 2017

Works perfectly! Thank you!

Do you know if a similar API is available for Jira, confluence or bamboo? 

Alexey_Efimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2017

Unfortunately, no, we used only Bitbucket Server and we used this REST to monitor License limit, cos if Bitbucket exceeded license limit it momentally block all work in our company.

Bhagwan Basnet (Aakash) November 21, 2017

Hi, I am new to Bitbucket and looking for similar solution.

could anyone please tell me how to run above API script? where to run those script?

I guess this is to run via our RSST API browser, what should be the value for parameter and value option?

is that script is to filter out the inactive users in Bitbucket.

Thanks

0 votes
Suganya February 8, 2017

In Bitbucket what is the difference between the "Size" returned from rest/api/1.0/users API and the current number of users in api/1.0/admin/license , I need to find the number of licensed users , which is the correct API i should use ? 

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2017

Hello @Jesper Eneberg

To get the "maximum number of users" of the current license for JIRA, you can use the following KB article to query a plugin which would have the same maximum user license as JIRA.

https://confluence.atlassian.com/jirakb/how-to-access-upm-rest-api-for-license-details-777021716.html

Jesper Eneberg January 26, 2017

I want too see the MAXIMUM number of active users that I can have with the current license. The KB you linked queries the number of active users that I currently have,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events