Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

USERS API

Damiao Duarte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 30, 2025 edited

Hello everyone,

I have full administrator access to a JIRA server, and I’m looking for a JIRA REST API endpoint that can provide the total number of users and the number of users who have used a license. I’ve reviewed the documentation, but I haven’t been able to find an endpoint related to this.

For example, I have 8,000 licenses, and 7,640 are currently in use. I’d like to retrieve this data to set up an automation.


Does anyone know if there’s an API about this topic ?

Any guidance would be greatly appreciated!

Thank you,

Damiao

 

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2025

Hi @Damiao Duarte 

As far as I know, there’s no official public REST API for license usage in Jira Server.

You can get that data directly through UI by this URL: /plugins/servlet/applications/versions-licenses however I won't suggest parsing the HTML for sure. 

You can use Java API to get those counts, hopefully this will work

def applicationManager = ComponentAccessor.getComponent(ApplicationManager)
def jiraSoftwareApp = applicationManager.getApplication("jira-software")
def userManager = ComponentAccessor.getUserManager()

def usersWithAccess = userManager.getUsers().findAll {
applicationManager.getUserApplicationAccess(it).any { app -> app.key == "jira-software" }
}

return "Users using a Jira Software license: ${usersWithAccess.size()}"

The solutions for Jira Server may not fulfil your request. I hope that helps.

Damiao Duarte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 30, 2025 edited

Hello @Tuncay Senturk

Thank you for your reply. 
Yes, I was able to find the total number of licenses.However,  to create an automation I also need the total of licenses used.
I found this documentation related to application Role, I’m not sure if it will be helpful, but I’ll give it try. 
https://docs.atlassian.com/software/jira/docs/api/REST/9.2.0/#api/2/applicationrole-getAll

In order to run this Java API code, do I need to run it on Jira Script console ? 

Thank you again for your attention! 

Damiao Duarte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
yesterday at 2:14 PM

Hello @Tuncay Senturk , 

I was able to get those answer here in this doc: https://docs.atlassian.com/software/jira/docs/api/REST/9.2.0/#api/2/applicationrole. It provides the total number of users and the number of users who have used a license.

thank you !

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, dance, gamification, badge, razzle dazzle, team '25 anaheim

Earn a one-day badge today and do the Atlazzle Dazzle! 🕺

Today only! Share what you’re the most excited about for Team ‘25 or just dance out the beginning of a new quarter with us.

Comment the post
AUG Leaders

Atlassian Community Events