Forums

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

USERS API

Damiao Duarte March 30, 2025

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 Champion
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 March 30, 2025

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 April 1, 2025

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 !

Like Tuncay Senturk likes this
Tuncay Senturk
Community Champion
April 2, 2025

Wow, looks great! Thanks for the update @Damiao Duarte 

Like Damiao Duarte likes this

Suggest an answer

Log in or Sign up to answer