Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tempo Rest API 4: tempo-to-jira returns duplicated values

Carlos A_ López Ortín April 23, 2025

Hello:

I'm developing an APP to retrieve some info from Tempo. I'm trying to link Tempo Worklogs with Jira worklogs, so I'm using tempo-to-jira endpoint to get the data.

When asking for the first batch of data, using:
https://api.tempo.io/4/worklogs/tempo-to-jira
I get 50 records, and a URL for the second batch:

If I use that second link, I get another 50 records... but the first 4 where in the first batch, so I'm having duplicated values, and 4 missing ones.
I don't know if you need more data, but I'm trying to get about 1800 values, so I don't know if it's OK to write here the list of retreiving values in the body of the request...
Thanks!

1 answer

0 votes
Eugenio Onofre
Community Champion
May 1, 2025

Hi @Carlos A_ López Ortín

The duplication you're seeing (e.g., the first 4 entries of the next batch overlapping with the previous one) could be due to data updates happening between calls, especially if worklogs are being edited or added during your fetch process.

However, if you're seeing consistent overlaps, it could also be an issue with how the offset is calculated on Tempo’s side. I would suggest trying to enable sorting (sortBy=date) in the request to ensure deterministic pagination.

About the Request Body, for this endpoint (/worklogs/tempo-to-jira), it's not typical to pass values in the body as it's a GET request, and most filtering is done via query parameters like:

  • offset
  • limit
  • from / to (for date ranges)
  • updatedFrom

You don't need to include the list of retrieved values in your request body as Tempo’s API handles the pagination and should return consistent results if your date range and parameters are fixed.

As a solution, I would suggest 

  • Use a fixed date range (from=YYYY-MM-DD&to=YYYY-MM-DD)
  • Add sorting (sortBy=date)
  • Use updatedFrom if you're tracking deltas

Basically, the GET call would look like:
GET https://api.tempo.io/4/worklogs/tempo-to-jira?from=2024-01-01&to=2024-01-31&offset=0&limit=50&sortBy=date

Please remember to vote and accept this answer in case it helps you resolve your question.

Regards,
Eugenio

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events