Retrieve Tempo data in worklog webhook

Our goal is to retrieve worklog data via webhook (in real time) including some Tempo specific data like worklog attributes.
The default Jira webhook delivers worklog data without the Tempo attributes.
So we tried the following:

  1. Jira webhook delivers worklog data including jira worklog id
  2. Try to retrieve the missing Tempo data by using the Tempo API
  3. Combine the Jira webhook worklog data with the data coming from the Tempo API

Problem: The Tempo API expects the Tempo worklog id which is not the same as the Jira worklog id given by the initial webhook

Does anyone know how we can reach our goal? Get the worklog data including Tempo attributes in real time? May there be a way to use Jira Automation to create a custom webhook which returns the desired data?

Thanks in advance for any hints!

1 Like

Hi @JosahWeber, welcome to the community!

While it is impossible to get Tempo’s attributes for a worklog using just the Jira worklog id in the latest version of their API (v4), it is possible in v3.

You can use the /worklogs/jira/{jiraWorklogId} to get the Tempo attributes using a Jira worklog id: REST API documentation.


1 Like

Hi @SamuelZhang, thanks for your quick answer! It solved the problem and we were able to get the data we wanted.

Do you know how long v3 will be supported? Wouldn’t be great if Tempo announces v3 won’t work anytime soon.

Hi @JosahWeber, great to hear that it worked for you!

Unfortunately, I don’t know if/whether Tempo will deprecate v3 of their API. You can reach out to Tempo here: Atlassian Marketplace

Worked for me too, just saved me countless hours of coding, had any return on this issue? I actually have the same question.

Edit: Just had a return on this topic by Tempo’s support → Version 3 of the Tempo REST API is scheduled to be deprecated in October 2023. Reminder - Improved REST API's Version 4

For using V4 we should use the following instructions:
To retrieve Tempo worklog information based on the Jira worklog id, two REST calls will need to be made.

The first call needs to be made to JIRA using the following:
GET [YOUR_JIRA/rest/api/3/issue/

{issueId or key}




In the properties section of the response, the Tempo worklog id is returned, similar to

… “issueId”: “12868”, “properties”: [ { “key”: “tempo”, “value”: { “shadow”: “true”, “tempo_id”: 9701 } } ] …

where the “temp_id” is the worklog id that the worklog has in the Tempo database.

This information can then be used to get the worklog information from Tempo using V4 methods normally.

Tempo API V4 supports this now :