Hi,
I am trying to get issues created between two dates. How I'm currently doing is basically using api call to run jql query (POST, /rest/api/2/search), getting the ticket id from the result, then running another rest api call (GET, /rest/api/2issue/{id}) with the ids replaced.
It works perfectly fine, but it just takes long to process the data if the dates are far apart. Is there any alternative to achieve the same thing? I have to get issues because Jql query results are just not detailed enough for my purpose :(
Thanks
Hi @yesoh
Just as an aside before I answer the question, you say you're using POST for step 1. Why? Surely it's also a GET?
What I think you're trying to do, can be done via this one call :
/rest/api/2/search?jql=createdDate > "2019-01-01" AND createdDate < "2019-11-30"
where you can put in the applicable start and end dates for your search
Hello,
I use POST because I'm pulling over 1000> tickets for the data, and it was recommended to use POST for larger data set.
And that's basically what I have for the first api call. But as mentioned above, the data is not detailed enough, for example, I need some of the customfields, worklogs, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @yesoh
Okay, it depends on what data you're after - you mention customfields and worklogs.
If there are other fields that you require that aren't coming through, then to speed up the initial call, add
&fields=key
to your initial search call, so that for each issue it returns a much smaller set of data, because key is the only item you need. That initial call should hopefully be a bit quicker.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.