Hello everyone,
I am developing a Connect app on Jira, which may be migrated to Forge in the future. I’m trying to retrieve the number of users of a license and the subscription type (Annual or Monthly) via the Jira Cloud REST API. Specifically, I need:
- The number of users under the license (e.g., 100, 200, 240, etc.).
- The subscription type: Annual or Monthly.
I’ve checked the Atlassian REST API documentation, but I couldn’t find a clear endpoint that provides this information.
Does anyone know which API endpoint(s) can be used to get this data?
Thanks.
Hello @BienLuong1
That’s strange. I Googled “Which Jira Cloud REST API endpoint provides licence information?” and the very first result was the link to the Licence Metrics endpoints that provide user counts per Jira licence.
There is no information provided via those endpoints that tell you the plan billing cycle, only the plan type… however, Enterprise plans are billed annually.
Refer to CLOUD-11751 for the corresponding Feature Request for an API to expose advanced plan billing information
Hi @BienLuong1
I would suggest taking a look at the Reporting API from the marketplace itself. Namely Get Licenses and Get Transactions.
These APIs provide the information you are looking for, for both APIs simply add the parameters text=[cloudId] and addon=[app-key] to the call to limit the results, you can limit it even more.
You will need to setup some credentials in order to access this from your app, but this comes down to an API key for a user that has the reporting permissions of your Marketplace Vendor account.
Cheers,
Mark