Timesheets (Cloud)
Breadcrumbs

Querying and Exporting Worklogs via API

This article is for Jira administrators, customers, and developers who want to do any of the following:

  • Query Jira worklogs via REST APIs

  • Export Jira worklogs into BI/reporting tools

  • Run automation scripts that filter out Tempo-generated worklogs

What Tempo Recommends

  • Use accountId for automation and reporting

  • Avoid using displayName as a key

  • If you already filter by displayName, update scripts to use accountId instead

Each Jira user (including add-on users) has a unique accountID, which serves as a stable identifier. We recommend to always filter using this field instead of displayName if you need to:

  • Find worklogs authored by Tempo

  • Exclude Tempo-created worklogs

Some customers filter Tempo worklogs by matching the worklog author’s display name, as indicated in the following examples:

  • "Tempo Timesheets"

  • "Timesheets by Tempo - Jira Time Tracking"

However, display names are not stable and may change due to Atlassian changes to addon-user naming behavior, such as updates tied to platform changes (e.g., Forge). Display names may also change due to marketplace listing name changes and branding updates.

If you filter by worklog author displayName, your scripts and reports may stop correctly identifying Tempo worklogs after a name change, even if nothing has changed in your environment.
When the display name changes, Jira also resolves it dynamically, meaning historical worklogs may also appear under the new name, making it hard to audit past data.

How to Identify Tempo’s Worklogs Correctly

To correctly identify worklogs, find the Tempo app user accountId. You can extract the accountId from any Tempo-created worklog by using the accountId as your filter, as highlighted in the example Jira worklog response below.

{
"worklogs": [
{
"self": "<https://<your-site>>.atlassian.net/rest/api/3/issue/<issueIdOrKey>/worklog/<worklogId>",
"author": {
"self": "<https://<your-site>>.atlassian.net/rest/api/3/user?accountId=<authorAccountId>",
"accountId": "557058:295406f3-a1fc-4733-b906-dd15d021bd79",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/...",
"24x24": "https://secure.gravatar.com/avatar/...",
"16x16": "https://secure.gravatar.com/avatar/...",
"32x32": "https://secure.gravatar.com/avatar/..."
},
"displayName": "Timesheets by Tempo - Jira Time Tracking",
"active": true,
"timeZone": "Etc/GMT",
"accountType": "app"
},
"updateAuthor": {
"self": "<https://<your-site>>.atlassian.net/rest/api/3/user?accountId=<updateAuthorAccountId>",
"accountId": "557058:295406f3-a1fc-4733-b906-dd15d021bd79",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/...",
"24x24": "https://secure.gravatar.com/avatar/...",
"16x16": "https://secure.gravatar.com/avatar/...",
"32x32": "https://secure.gravatar.com/avatar/..."
},
"displayName": "Timesheets by Tempo - Jira Time Tracking",
"active": true,
"timeZone": "Etc/GMT",
"accountType": "app"
}
}
]
}


Example of how to filter out Tempo worklogs:

Instead of this (unstable)

JavaScript
if worklog.author.displayName == "Tempo Timesheets":
    exclude 


Use this (stable)

C++
if worklog.author.accountId == "<tempo_app_account_id>":
    exclude


FAQ

Does the accountId ever change?

No. accountId is the stable identity Atlassian uses for Jira users, and it remains consistent even when the display name changes.

Why did my old worklogs change too?

Jira resolves displayName dynamically. When an account’s displayName updates, it will appear updated everywhere that account is referenced, including in worklogs created in the past.