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 ?
@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";
Correct.
The reason why the query works in the UI is because JQL searches can only be performed from within the context of a Project, so that Project is the boundary (scope) of the query.
This is described in the documentation for the Search for Issues using JQL endpoint:
order by key desc
.assignee = currentUser() order by key
.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, something weird is happening. The documentation does not match the behavior. This must be some kind of regex check? It is doing some kind of filter to make sure we have limiters but that filter is returning odd results. Here are the queries I've tried so far from the endpoint at /rest/api/3/search/jql
Exact JQL: assignee = currentUser() order by key.
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
Exact JQL: project = JIRA AND updated >= "2025-10-01" AND updated <= "2025-10-02"
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
Exact JQL: assignee = currentUser() and project = JD
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
Exact JQL: assignee = currentUser() and project = JIRA and created > -30d and created < -10d
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
Exact JQL: created >= "2025-09-16" AND created <= "2025-09-24" AND project = JD ORDER BY created DESC
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
Exact JQL: created >= "2025-09-16" AND created <= "2025-09-24" AND project = JD AND sprint = 365
Error: Unbounded JQL queries are not allowed here. Please add a search restriction to your query. | {}
EDIT:
I think I found part of it after a bit more testing. The enhanced search endpoint has somewhat different handling of GET than the old endpoint used to. When I start using POST on all of these queries above, they start working.
I have no idea why the error is what it is though, it seems to throw that unbounded error out all the time on GET.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And welcome to the community.
I think you should URL encode this
updatedDate>=1d or createdDate>=-1d order by created DESC
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.