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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.