I need to setup a way to monitor if the user limit is reached or not for my Bitbucket.
You can monitor the "/rest/api/1.0/admin/license" endpoint. Documentation here: docs.atlassian.com
GET against that endpoint returns something like this, which includes your limit as well as your current active user count:
{
"creationDate": 1331038800000,
"purchaseDate": 1331038800000,
"expiryDate": 1372493732817,
"numberOfDaysBeforeExpiry": 0,
"maintenanceExpiryDate": 1372493732817,
"numberOfDaysBeforeMaintenanceExpiry": 0,
"gracePeriodEndDate": 1372493732817,
"numberOfDaysBeforeGracePeriodExpiry": 0,
"maximumNumberOfUsers": 12,
"unlimitedNumberOfUsers": false,
"serverId": "<server ID embedded in license>",
"supportEntitlementNumber": "<support entitlement number embedded in license>",
"license": "<encoded license text>",
"status": {
"serverId": "<actual server ID>",
"currentNumberOfUsers": 2
}
}
(Note: since you're on Data Center I adjusted the tags on this question to "Bitbucket-Server" and "Data Center". This question was originally tagged with "Bitbucket-Cloud" and "Cloud" which probably caused some confusion since that's a completely separate product with different capabilities and different REST endpoints).
Hi @saisn, welcome to the Community!
The user count can not grow without acknowledgment from the admin, as the admin needs to grant them permissions to his repositories. It's not possible for users to access a repository if they haven't been granted permissions first.
Are you contemplating any scenario where this would not be the case?
Hope the above explanation makes sense, let us know if something is not clear and we'll be happy to clarify.
Best regards,
Aa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ana Retamal
Thanks.
Actually Nope, thats not what I was looking for. I am an admin and I grant permissions myself to other users. Ours is a Datacenter edition with 500 user capacity. What I want is to be able to get notified when my limit reaches, lets say - 480 or 450 -- so I will know I have to either extend license or cleanup users etc.
Hope I am clear now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.