Need to Automate Time Reports

I want to implement automated time reports sent to individual users, especially those whose time entry is below a certain threshold for the week. Now, I see there is a Time Tracking REST API, but it has mostly methods for changing system-wide time tracking settings and ones for managing work items for a particular user. The only GET method for work items is for getting those of a particular issue. I need one that allows me to query work items generally - for a particular user in a particular time frame, for instance. Even a broader one that returns all work items for a particular period of time would be useful. So are there any undocumented methods of the Time Tracking REST API that would allow that kind of access to work items?

I might also be able to work with a Time Report if I could get a report from the REST API in JSON format. I noticed the time reports use REST URLs (e.g. /rest/reports/time/Weekly%20Time%20Report%20-%20Work%20Author) and I've found that I can add /dataView to the end of this URL to get the report table HTML only. Is there a way to get this report to just return JSON or something comparable?

Also, will we be able to access work items in custom workflows at some point?

Crickets? Seriously? Is anyone at JetBrains paying attention to this forum?
Hi Brandon,
We don't have REST methods to get reports data or find work items.
But there is a workaround for you. You can export time report data in CSV format and then process it as you wish.
Just click on 'Export report' button on time report page to download CSV file.
You can also download it from script. To do that do following:
1. Go to reports page and copy link address of 'Export report' button.
2. Log in to YT using REST.
3. Download file using link address from step 1.
For example (with curl):
curl -c cookie -d "login=root&password=root" http://localhost:8080/rest/user/login
curl -b cookie "http://localhost:8080/export/exportReport/xml?type=time&name=no+group"

Please sign in to leave a comment.