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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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
Site Admin
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

125 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you