Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jira REST API get last issues

Tags:

jira

My application should execute some logic each time new issue is added to Jira. I guess the only option for me is to request last added issues every n seconds and find out which issues are new. I am investigating Jira REST API but can't find there any method for retrieving last issues. Is it possible?

like image 753
SiberianGuy Avatar asked Nov 14 '25 20:11

SiberianGuy


1 Answers

For your polling based solution, you can query the "Search" method in Jira REST API with JQL.

POST to:

http://[yourjirainstance]/rest/api/2/search

With sdata query in body:

{"jql" : "project = MyProject and updated>=2012-09-01",
                 "startAt" : 0,
                 "maxResults" : 50
}

This way you can do queries that you would normally do on the Jira interface. Check this for reference of fiels you can use in queries.

Needless to say but don't forget "Content-Type: application/json" in the headers and workout authentication if the session is not already authenticated.

like image 63
kalana Avatar answered Nov 17 '25 12:11

kalana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!