Is there a JIRA remote API method to get a list of users?

Greg Warner August 16, 2011

I manage a large JIRA instance that reguarly needs to have users removed as employees come and go.

I can source employee information from our HR system.

I need to compare these to JIRA users and where a JIRA user exists, but not in our HR system, update the JIRA user so that they are move to a leavers JIRA group (without deleting the user).

Is there a method in the JIRA API to retrieve a list of users? Previously I've done this by querying the JIRA database user table directly. It seems more elegant to do this via the API. I would then compare the list of users with their data in the HR system and only modify the JIRA users who have left. Much more efficient than checking every user in JIRA and HR.

1 answer

1 accepted

2 votes
Answer accepted
Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2011

JIRA Command Line Interface has various user functions, specifically getUserList for a group. This corresponds to a SOAP capability. If all your active users are in jira-users then that would work. Otherwise, I don't know of a simple way to list all users via SOAP. I think the REST APIs are similarly lacking in this area currently.

Greg Warner August 30, 2011

Here's what I did:

got the users from the JIRA database directly by doing

select username from userbase

this created a list, which I cycled through looking for usernames in JIRA and comparing them to my HR system.

then logged into JIRA using SOAP and removed them from the jira-user group and added them into a jira-leavers group.

I'm now working on zapping their project roles too.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events