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

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

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"
  }
}

Works perfectly! Thank you!

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

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.

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

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,

0 votes
Tarun Sapra Community Champion Jan 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

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 ? 

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

654 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot