JiraAlign api to get active timetracking users

Kulluru, Manoj kumar
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!
August 3, 2022

Hi Team,

                I am trying to fetch the users from API enabled for time tracking. I am using the link below, but it is not sending the correct results. I verified the results with the filters on the UI page, which don't match. Any help here is highly appreciated.

 

https://mysite.com/api/users?isTimeTracker=true

 

Thank you,

Manoj

2 answers

1 accepted

0 votes
Answer accepted
Rodrigo Cortez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2022

The correct syntax for the isTimeTracking parameter is:

isTimeTracking eq 1
  • 1 = true
  • 0 = false

A functional cURL call is demonstrated below:

curl -X GET "https://instance.jiraalign.com/rest/align/api/2/Users?filter=isTimeTracking%20eq%201" -H "accept: application/json;odata.metadata=minimal;odata.streaming=true" -H "Authorization: bearer MyObfuscatedToken"

You can expand the demonstrated filter to better match other needs, eg. active users as opposed to all users.

Please refer to Help Center articles 10X: API 2.0 for further details on filters, query syntax, and encoding.

Kulluru, Manoj kumar
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!
August 16, 2022

This solution worked for me. Thanks a lot, @Rodrigo Cortez 

Like Rodrigo Cortez likes this
1 vote
Nimeshkumar Patel
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2022

Hi Manoj,

The API call will fetch all the user records (irrespective of the user is "Active" or "Deactivated"). So you will find more users through API call than what you will see in the (Admin-->People) list.

Make sure you consider deactivated users as well;

Go to Admin-->People

Apply Filters-->"Deactivated"=YES

 

Hope this helps.

Regards,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events