Retrieving Work Logs via the API

Fetch logged work data through the API.

Due to our privacy-first approach, detailed in this article, you must use the Jira REST API to retrieve work logs with JetTime metadata.

Scenario for Retrieving Work Logs

1. Retrieve Work Items Using JQL

First, retrieve the work items you want to get work logs for using the Search for issues using JQL enhanced search endpoint. For example, search for specific space work items or work items with a particular custom field set.

Notes and Hints:

  • Use the worklogDate JQL field to limit work items to those with work logs in the selected date range.
  • Due to Jira's inconsistencies in handling time zones, we recommend extending the date range by one day at the start and end of the range. Then filter individual work logs by their exact date.

2. Retrieve Work Logs for Each Work Item

For each work item retrieved, use the Get issue worklogs Jira API endpoint. Make sure to include the expand=properties parameter to retrieve JetTime metadata for each work log.

3. Read the JetTime Property

The metadata sits in the property with the key jettime. Alongside the custom time categories and work log fields, it records how the work is organized: account, team, and functionRole, each stored as {"name": ..., "key": ...} or null. See JetTime Work Log Metadata for the full shape.

Notes and Hints:

  • Group and match on the key. It is the stable identifier; the name is a snapshot taken when the entry was written, so an object renamed since then still reads under its old name.
  • Any of account, team and functionRole can be absent or null — the work log simply wasn't logged under one.

Alternative Method

As an alternative, you can export all work logs through JetTime's reports in the app UI. For details, refer to Exporting Work Logs to CSV Using the App Interface.

By following the above steps, you can efficiently retrieve work logs and include JetTime-specific metadata while aligning with our privacy-first design principles.

On this page