We are encountering an issue when querying Confluence spaces using the CQL REST API. Our goal is to search for spaces where the title starts with collab-
, specifically for dynamically identifying collaboration spaces.
The following query returns results as expected:
/wiki/rest/api/search?cql=(type="space" and space.title~"collab-")
However, when attempting to use a wildcard to match any titles starting with collab-
, such as:
/wiki/rest/api/search?cql=(type="space" and space.title~"collab-*")
Expected Behavior:
We expected that using the *
Wildcard would return all spaces whose title starts with collab-
.
Actual Behavior:
The query using collab-*
returns no results, even though such spaces do exist.
Impact:
This behavior limits our ability to identify collaboration spaces with a consistent naming convention programmatically.
Steps to Reproduce:
Create a Confluence space titled collab-abc
Run the following query:/wiki/rest/api/search?cql=(type="space" and space.title~"collab-*")
Observe that no results are returned.
Question:
Does space.title~
Support wildcards like *
In CQL? If not, is there any alternative way to query for space titles starting with a given prefix?
Environment:
Confluence Cloud
CQL REST API- /rest/api/search
URL used:https://test-confluence.net/wiki/rest/api/search?cql=(type="space" and space.title~"collab-*")
Let me know if you'd like a formatted Markdown or .txt
version of this template!
Hi @sainath -- Welcome to the Atlassian Community!
I did a quick check and did not find this symptom / limitation in the public backlog.
As you appear to be on a paid license, please work with your Jira Site Admin to contact Atlassian Support to submit the defect here:
https://support.atlassian.com/contact/#/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.