Forums

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

JiRA Cloud REST API, jql filter issues.

Felix Torres
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, 2020

Hello team, I'm at blockade trying to get a specific list of issues. To give a little bit of background, I'm building a BI dashboard, and I'm in need of getting a list of issues withing a specific project and that have a specific workflow status. 

Here are a list of queries that I've used in order to try and get this working. Starting with the most successful.

First, I try using the search endpoint with JQL and pagination:

https://lmscloud.atlassian.net/rest/api/3/search?jql=project="X"&status='X'&startAt=0&maxResults=0


 

This gives me back the results I need, however, it seems it's being treated as an autocomplete and I get a very large list of false positives, primarily because of the term active. Which leaves me with a long pagination list to iterate through.

I've also tried creating a filter and using the filterId and I've tried searching through projects. Finally, I've looked into the experimental JQL Parse, but haven't been successful yet and I'm not sure if I want to have an experimental endpoint in a production environment.

Any help would be greatly appreciated.

1 answer

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 10, 2020

Hello @Felix Torres ,

Looking at the above JQL it seems that there is an 'AND' missing. Also, I would avoid adding:

  • startAt=0 (if not specified it always start at 0)
  • maxResult=0 (this would mean that you want to get at most 0 results in return)

 

What I would use instead is:

https://lmscloud.atlassian.net/rest/api/3/search?jql=project=NAME%20AND%20status=STATUS

 

Also, generally speaking, if you are not sure about the JQL to be passed to the rest/api/<VERSION>/search REST API endpoint, I would advice to run the search from the UI and then copy the JQL from the URL in the address-bar of your Internet browser.

 

Let me know if this helps.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer