JIRA REST API - Fetch details of list of all the users in JIRA along with last login time

Aishwarya Rajan April 12, 2018

Hey guys...I need to get a list of all the users using JIRA and one of the condition is the data should include last login time property...currently after doing a bit of mix n match..I have this api which fetches list of all users :

 

http://domanin-name/jira/rest/api/latest/user/search?startAt=0&maxResults=1000&username=.

it gives me list of 1000 users...but without last login time property

 

and i researched in the jira rest api documentation that this below url

{JIRA_URL}/rest/extender/1.0/user/{JIRA_USER}/properties/login returns login time for admins ..I want to get an api that has list of basic users details with last login time..any leads about this

 

1 answer

0 votes
Pedro Souza
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2018

Hello Aishwarya,

 

Let me ask you, is it required to retrieve this specifically from the REST API?

I ask this because it would be easier to retrieve this information from the database, in fact, we have an article in our knowledge base that describes how to retrieve this list of users with the last login date from the database, as you can see described below:

 

Please, let me hear from you.

 

Kind regards,

Pedro Souza.

Aishwarya Rajan April 24, 2018

Hey @Pedro Souza

Thank you for your response.  I actually want to fetch the list of users using my company jira system along with last login time of all the users. I wrote js scripts and embedded jira apis in the scripts and fetched the output data in excel sheets through the scripts.  Hence I was using the jira api to do that, but as we know it has two limitations:

1) The api doesnt fetch more than 1000 records 

2) there is no way to retrieve last login time for a user from the user api.

 

We do have an external database system in our company where in we are extracting the data from JIRA and putting it into teradata rdbms through etl..but the tables are only for issue types like epics, stories and sub tasks and there are no tables dedicated for users. I am not sure if there is a way to connect rdbms to jira server to fetch the user data tables by default..(i DONT THINK there is any such way). Do suggest me if you have any alternatives..would be a great help.

Suggest an answer

Log in or Sign up to answer