Search API call returns empty items listing Edited

Hi everyone,

on a JIRA Server instance i call /rest/api/2/search 

and POST the following data:

 

{
"jql": "cf[10306] = 303422",
"fields": [
"subtasks",
"attachment",
"summary",
"resolution",
"subtasks",
"timeoriginalestimate",
"customfield_10302",
"status",
"timespent",
"timeestimate",
"subtasks",
"issuetype"
],
"maxResults": 999999999,
"startAt": 0
}

What i get as a result is

{
"startAt": 0,
"maxResults": 0,
"total": 6,
"issues": []
}

Even though the total is 6 (which is correct, when i run the JQL above with the same result i see 6 issues.) the issues array is empty.

What can be the cause for the issues array being empty?

Additionally i would have expected maxResults to be 1000.

Thanks a lot!

2 answers

0 vote
Warren Levy Community Champion Aug 23, 2017

Hi Jens

There may more than one issue affecting you here. See here for details if you haven't already.

The value that you've used for maxResults is too large - try 50 just to see if you get any through - I think your results is saying that there are 6 available (which is correct), it's starting at 0 (which is correct) and finishing at 0 (because it can't interpret your value for maxResults). 

Hi Levi,

usually the 999999999 is no problem, we always run the search like this in our product.

According to the docs JIRA corrects it to the maximum configured.

But i will give it a try and also try to leave out the fields.

thanks

Jens

For the record:

The reason was this setting in the clients JIRA server:

jira.search.views.default.max : 0

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Friday in Off-topic

Friday Fun: Riddle me this

Happy Friday, Funmakers! We had a Community Team offsite in Austin this week, and my mind feels primed for thinkin' from all the brainstorming we did!  So, this week's Friday Fun thread w...

112 views 12 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you