Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Search content API fails with CQL error for cql=lastModified>="2020/11/10" but works for type=page

sam saas
Contributor
December 8, 2020

I am using this API : 
https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-api-content-search-get

For cql=type=page the pagination works fine.
But when cql='lastModified>="2020/11/10" is passed it fails with the following error : 

CQL was parsed but the search manager was unable to execute the search. CQL: 'lastModified>=\"2020/11/10\"'. Error message: com.atlassian.confluence.search.searchnsmarts.rest.SSSearchClientException: There was an illegal request passed to S&S Content Search API : HTTP/1.1 400 "}

Is this a REST API issue?

1 answer

6 votes
sam saas
Contributor
December 9, 2020

On drilling down on this, figured out that the cursor generated for the next page when the cql='lastModified>="2020/11/10" is passed, contains a "%2B" character set, which passed in the REST call gets encoded to "+".

In order to fix this, I had to escape the %2B in the cursor by replacing it with %252B.

Ideally, cursors sent by Atlassian should not have standard urlencode character-set , as these are passed in the resource path of the API.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events