Hi,
I have a JQL query I use in Jira I'd like to convert to a Jira API call.
Having gone through the API documentation, I can't see how I might easily achieve this, and would appreciate any advice.
I want to get the list of stories that have a changed to a given status in a given time window. The JQL is as follows:
issuetype in (Story, Bug, Release)
and status changed to ( "In development", "In Code review", "In testing")
during ("2021/03/01", now())
I have tried GET /rest/api/3/worklog/updated, but this doesn't seem to work.
Any advice greatly appreciated.
Hi @Darryl Blackwell ,
You can pass jql as parameter to the search rest api below /rest/api/2/search?jql={yourJQL}
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/search-search
Hi @Darryl Blackwell -- Welcome to the Atlassian Community!
I am using Cloud version, but I found this documentation on JQL searches using the server REST API. Please check if that helps you.
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill / Bloompeak Support - many thanks for your answers - worked a treat :-)
I also found the overhead of returning 200x items in a single call much greater in terms of execution time vs 4x requests of 50x items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Darryl. I am glad that worked for you.
Your result of the single call with the larger set being much slower seems interesting. Did you end up making multiple calls, incrementing startAt?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - I created a method that issued the original JQL call and set the startAt value to 0 and maxResults to 50.
The response gives an array of up to 50 issues and a ‘total’ value that shows how many items the query returned across pages.
if the total results value exceeded the page size (of 50), I setup a call chain in NodeJS/JavaScript that created an array of Url request promises with the startAt value incremented by the page size, then executed a Promise.all() and these then execute in (relative) concurrency.
The 19x batched concurrent calls appeared to execute in a rough order of magnitude quicker than a single call which would returning all items (982 in the test case), which surprised me.
Must be some overhead in serialising the response and returning a large dataset over the wire in one go I guess...
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.