Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Where can I find documentation for the Confluence API search 'cqlcontext'?

Thomas Berger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2016

The confluence "cqlcontext" search context is mentioned under

/rest/api/content/search

"Fetch a list of content using the Confluence Query Language (CQL).

cqlcontext: the context to execute a cql search in, this is the json serialized form of SearchContext"

The given example doesn't make sense to me:

http://localhost:8080/confluence/rest/api/content/search?cql=creator=currentUser()&cqlcontext={%22spaceKey%22:%22TST%22, %22contentId%22:%2255%22}

Does this query return 'content' where the currentUser() is creator in the space with key 'TST' AND for 'contentId' = '55' ???

Where can I find documentation for the Confluence API CQL "cqlcontext" option?

It's not covered on https://developer.atlassian.com/confdev/confluence-server-rest-api/advanced-searching-using-cql

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Roland Krüger October 27, 2017

Even though I'm not able to find any helpful documentation about this parameter, either, I found out that you could simply use the verbatim String `null` for `cqlcontext` to make this work. This might help other community members who want to use this REST service, e. g. via the REST API browser.

In Java code, class RemoteCQLSearchServiceImpl might be worth a look. This is used by class `com.atlassian.confluence.test.rest.api.ConfluenceRestSession` in the Confluence Selenium tests.

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2016

There's a little bit more information on this page:

https://docs.atlassian.com/com/atlassian/confluence/atlassian-confluence/latest/com/atlassian/confluence/plugins/restapi/resources/SearchResource.html

My guess is that it is for future terms that have not yet been implemented, like "currentSpace()" or "currentPage()", which would have no way of knowing which space or page is being referred to unless there is some context applied.

0 votes
Sam Hasler July 12, 2016

It doesn't make much sense. The "cqlcontext" parameter appears to just be extra search terms. Why would they be in cqlcontext and not just in the cql parameter?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events