Forums

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

JQL query through API returns 400 error - Unbounded query, but works through UI

Nenad Crnčec
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!
September 4, 2025

When I am writing query through UI 

updatedDate >= -1d or createdDate >= -1d order by created DESC
query works - returns all work items changed or created in the last day.
When I use this query in Springboot

return objectMapper.readTree(atlassianHostRestClients.authenticatedAsAddon(atlassianHostRepository
.findById(clientKey).get())
.getForObject(url, String.class));

 

where url is 

 "/rest/api/3/search/jql?updatedDate>=1d or createdDate>=-1d order by created DESC&fields=summary,description,status,creator,reporter,type,assignee,due,created,updated&maxResults=5000";

 I get 

 400 Bad Request: "{"errorMessages":["Unbounded JQL queries are not allowed here. Please add a search restriction to your query."],"errors":{}}"

 

Any ideas ? What am I missing ?

 

 

2 answers

0 votes
Michael Yaroshefsky - Visor for Jira
Atlassian Partner
September 4, 2025

@Nenad Crnčec - welcome to the Atlassian Community!

The Jira Cloud REST API has stricter requirements than the UI (hence why it's working in the UI), specifically, the API will reject "unbounded" queries (which are queries without restrictions like project, issue key, or other elements to narrow the query's execution).

So you need to bound the query, for example by restricting it to a specific project, like this:


/rest/api/3/search?jql=project=INSERT YOUR PROJECT NAME HERE and (updatedDate>=-1d or createdDate>=-1d) order by created DESC&fields=summary,
description,status,creator,reporter,type,assignee,due,created,updated&maxResults=5000"
;
Hope that helps.
Mike
0 votes
Rudy Holtkamp
Community Champion
September 4, 2025

Hi @Nenad Crnčec 

And welcome to the community.

I think you should URL encode this 

updatedDate>=1d or createdDate>=-1d order by created DESC

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events