Forums

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

REST API for getting JIRA issues

kodyaz March 23, 2019

Hello experts,

I'm using REST API to search Jira issues for a specific project as described at how to use JIRA REST API to get list of Jira issues

I can successfully fetch all issues created under that specific JIRA project

But when I consider performance, I have a question to be answered.

I could not figure out an option that will enable me to filter only the issues new or updated since my last query. So every time, I have fetch all issues from that project which cause me waste resources to get the same unchanged records every day.

This is getting more and more importance for projects with high number of members and active for a long time.

 

As in the above sample, I use project, startAt and maxResults as the only URL options for search issues API method

 

I want to limit this query for only delta records since a given date maybe I can use LastUpdatedDate, etc.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2019

The REST API returns the results of searches.  Searches can have clauses like "updated after (relative date/time)".   So all you need to do is add an updated  clause to your search that's going to the API.

kodyaz March 23, 2019

Hi @Nic Brough -Adaptavist- 

I could not find the correct form of the URL parameters

For example, following call brings 500 issues but have issues even the first of March

But I'm looking for only a few days records

 

/rest/api/2/search?jql=project%20%3D%20%22ART%40S4%22%20&startAt=1&maxResults=5&=updatedDate%20%3E%20%20%20'2019-03-22T00:00:00.000+0000'%20ORDER%20BY%20updated%20DESC

kodyaz March 24, 2019

I figured it out now, the updatedDate should be within jql query,

Thanks for the hint,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events