I'm struggling to figure out how to encode special characters in a CQL query against page title. I believe it'll be some magic combo of tricks that I haven't stumbled upon yet.
This is a start but doesn't work in my case: https://stackoverflow.com/questions/38730384/confluence-rest-api-search-error-with-encoding-cql-query-when-encoding
With title: Pepe "testing" CQL encoding
encoded as: Pepe %%22testing%%22 CQL encoding
I get the bad request response: 'message': 'Unrecognised clause at : "testing%"CQLencoding',
Using the page title verbatim: 'message': 'Unrecognised clause at : "testing"CQLencoding',
The request looks like this:
space = 'PRAE'
title = 'Pepe "testing" CQL encoding'
params = 'cql=space=%s and title=%s' % (space, title)
server_confluence_page = get('%s/rest/api/content/search?%s' % (confluence_server_baseurl, params))
It doesn't look promising: https://jira.atlassian.com/browse/CONFSERVER-55559
for posterity - I was fixing up links as part of a cloud to server merge project. The page names stayed consistent so I leveraged that. I abandoned this path and ended up building my own mapping of:
md5 hash of page title, cloud page id, server page id
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.