Forums

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

All issues aren't returned for a search (/rest/api/2/search), when no "jql" expression is provided?

nlykkei
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!
June 8, 2020

I've attempted to return all issues from Jira in a paged fashion by providing no jql query parameter to a search (/rest/api/2/search).

However, in my case no issues are returned, when no jql query parameter is provided.

Is this a bug, or what am I doing wrong?

https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-search-get

jql

string

The JQL that defines the search. Note:

  • If no JQL expression is provided, all issues are returned.

Examples:

No results are returned if jql is empty:

$ curl -XGET -s -u 'user:pass' 'https://jira.myorg.net/rest/api/2/search?startAt=0&maxResults=1&jql=&fields=description,summary,comment,attachment&expand=' | jq
{
"startAt": 0,
"maxResults": 1,
"total": 0,
"issues": []
}

Results are returned if jql is non-empty:

$ curl -XGET -s -u 'user:pass' 'https://jira.myorg.net/rest/api/2/search?startAt=0&maxResults=1&jql=description+IS+NOT+NULL+OR+summary+IS+NOT+NULL&fields=description,summary,comment,attachment&expand=' | jq
{
"expand": "names,schema",
"startAt": 0,
"maxResults": 1,
"total": 464402,
"issues": [
{
...

 

0 answers

Suggest an answer

Log in or Sign up to answer