Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get a user's worklogs for a certain period (with Tempo)

Rudie December 13, 2014

With or without Tempo. Tempo has a UI for this at jira/secure/TempoUserBoard!timesheet.jspa. I want that view, in the API.

I've been using the rest api browser to find relevant resources, but I can't find one that gives me worklogs.

I've looked at jira/rest/tempo-rest/1.0/tempo-worklogs, which gives me issues, projects and worklogs, but none of the input seems to do anything and the result is completely useless. All users, some projects, more sprints, etc, but not ALL of it.

I've also tried so find some kind of XML export via the UI, but it only exposes a "Printable", which is not very machine friendly. There's also Excel, but I rather not.

I don't know the Tempo lingo (worklogs, timesheets, approval periods!?) so I might be looking in the wrong place. I see in the rest api browser Tempo has a LOT of resources, so there must be something that fits.

Bonus points for a method that doesn't require Tempo and works on all JIRA instances, including OnDemand.

I am now using jira/rest/tempo-timesheets/1/user/issues/FLEX?username=rudie but it returns line items, not worklogs, so it's not perfect, but it does have all the data. The question is still: how do I say what period I want? According to the rest api browser the FLEX part is a perod, of type String and style Template. I have no idea what could fit in there... With FLEX (and anything else) it returns this month's worklogs.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Susanne Götz [Tempo]
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.
December 14, 2014

Hi Rudie,

please take a look at the Tempo Servlet (https://tempoplugin.jira.com/wiki/display/TEMPO710/Tempo+Servlet+Manual). The GetWorklogs API will return the worklogs for a given period and by adding parameters you can extend /filter the information returned.

Kind regards,

Susanne

Rudie December 15, 2014

I saw that one, but it's XML and requires a token. I use http auth to authenticate in Jira's API. It's all I know. How would I get it? Tempo adds so many API methods, isn't there anything that does what GetWorklogs does?

Susanne Götz [Tempo]
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.
December 16, 2014

So far, there is no API method that returns the same data as GetWorklogs, but we are working on it. The Tempo Security token can be found in Tempo Administration -> Access Control. Please note also that all the Tempo APIs in the JIRA REST Browser are private and subject to change.

Rudie December 16, 2014

As a normal user I don't have access to Tempo Administration, so I can't use it. I can use the 'private' API as a normal user. Probably because I can see my own timesheet as a normal user. I'll take my chances on the changeability =) Thanks. (How do I keep up to date with Tempo API changes?)

Susanne Götz [Tempo]
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.
December 16, 2014

As this is a private API, we are not sending out any information about changes, so if you upgrade Tempo, you should try to create your report and see if you still get the expected result. Changes to the API are not very common. We are working on documenting these APIs and you can follow the linked pages of https://tempoplugin.jira.com/wiki/display/JTS/Tempo+REST+APIs for updates.

vinayak sharma December 23, 2016

I know this is old thread but i want to do the same task as asked in question . Is there any way to do it now without token?

0 votes
Adam Labus March 24, 2018

Hello guys,

Please check my plugin Extender for JIRA and documentations Get Worklogs.

With my plugin you can now search worklogs for specific user, issue or JQL query using dedicated parameters like date, project kay etc.

Best regards
Adam Labus  

TAGS
AUG Leaders

Atlassian Community Events