Forums

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

How to get issues updated after certain date using api ?

Amol Gunjal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2023

I am trying to get all the issues in project X updated after date Y. I have trued below api but it does not respect the passed date and returns default 50 issues.

baseurl/rest/api/2/search?jql=project=X&fields=updated&updated>2023-03-09

2 answers

2 accepted

1 vote
Answer accepted
Amol Gunjal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2023

Here is what worked for me :

String url = "baseurl/rest/api/2/search?jql=project=X AND updated>='2023-03-09 10:10'";

String query = URLEncoder.encode(url, StandardCharsets.UTF_8.toString());

 

And then get result for the above url.

1 vote
Answer accepted
Kristopher Perez
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 8, 2023

The end point won't work because of the ampersands after project.

You currently have:

?jql=project=X&fields=updated&updated>2023-03-09

What you should have is:

?jql=project=X%20and%20updated%20>%202023-03-09

The "Search for issues using JQL (GET) end point specifies that the value after jql should just be a proper JQL query.

The way I would generate the query in the first place is to run the JQL in the UI, and then copy the portion of the URL containing the query.

Kris

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events