Get issue change history within defined timestamp using REST API

Adiel Segal September 23, 2019

Hi,

 

I'm trying to perform an API call in order to get information specifically about issue changes history within a defined timestamp-for example last 24 hours. 

I'm using currently this:

jira/rest/api/2/issue/API-1?expand=changelog

 

but of course in this case, since no filter regarding the required period of time in which changes were occurred defined, I'm getting the whole history log.

 

May someone assist me with that?

 

Thanks

Adiel

 

 

1 answer

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2019

Hi @Adiel Segal ,

I may not be the best person to answer this question but I believe you can achieve something similar by using the /rest/api/2/search endpoint together wit the JQL described in the below threads:

Please review above 2 threads and let me know if they help.

 

Cheers,
Dario

Adiel Segal October 2, 2019

Hello Dario,

 

Thank you for the info, but it still doesn't seem to help me with solving my specific issue.

I need to have the ability to track historical changes in specific custom fields during a period of time(last 24 hours), but as described here:

https://community.atlassian.com/t5/Jira-Software-questions/History-searches-do-not-support-the-quot-quot/qaq-p/874742 

only specific fields are enabled to be tracked. 

 

the other option is what I described initially-to get somehow relevant information specifically about issue changes history within a defined timestamp, parse the results and then "catch" relevant changes of fields I would like to track.

 

Thanks,

Adiel

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2019

Hi @Adiel Segal ,

What you are trying to achieve is indeed not possible OOB.

There was a feature request open in our system to ask to have a REST API endpoint to retrieve historical data but it looks like it has been closed yesterday due to limited demand:

 

There is also another feature request still open, asking to add a REST API endpoint to get all changelog for an issue (ordered by time) like it has already been done for Jira Cloud:

 

At this point, you may want to:

  1. Vote and set yourself as a watcher to the feature request still open so that you will be notified in case of any update.
  2. Check if you can get the desired data from Jira DB as explained in the following KB article: Retrieve issue change history from database in Jira server
  3. Search the Atlassian Marketplace for any time-tracking app that offers this functionality: https://marketplace.atlassian.com/search?product=jira&query=time%20tracking

 

I hope this helps.

 

Cheers,
Dario

Like Adiel Segal likes this

Suggest an answer

Log in or Sign up to answer