Skip to content

[Confluence] ConfluenceV2: add cql() - #1696

Merged
gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-cql
Oct 19, 2026
Merged

gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-cql

Conversation

@LuisFigueroaG

Copy link
Copy Markdown
Contributor

The CQL section of the docs uses confluence.cql(...), and the Server and legacy Cloud clients have it, but ConfluenceV2 only had iter_cql() and cql_all(). Calling cql() on it failed with 'ConfluenceCloud' object has no attribute 'cql'. Confluence() also returns this client for API gateway URLs (scoped tokens), so those callers got the same error.

This adds cql() to ConfluenceV2. It returns one page of results from rest/api/search, the v1 endpoint that search() and iter_cql() already use since there is no v2 search, and accepts limit, expand (e.g. content.body.storage) and the cursor from a previous response's _links.next.

  • Added tests in tests/test_confluence_v2.py
  • Updated the CQL section in docs/confluence.rst

Fixes #1695

The Server and legacy Cloud clients have cql(), and the CQL section of
the docs uses it, but ConfluenceV2 only had iter_cql() and cql_all(), so
confluence.cql(...) failed with "'ConfluenceCloud' object has no
attribute 'cql'". Confluence() returns the same client for API gateway
URLs (scoped tokens), so those callers hit the error too.

cql() returns one page of results from the v1 rest/api/search endpoint,
which search() and iter_cql() already use, and accepts limit, expand
and the cursor from a previous response.
@gonchik
gonchik merged commit c248955 into atlassian-api:master Oct 19, 2026
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Confluence] Unable to perform CQL queries

2 participants