How to pass contentStatuses in cqlContext object for CQL Search API

How to pass contentStatuses in cqlContext object for CQL Search API?
Can you share a sample request for getting items with status = current?

1 Like

Hey @JatinChopra / @raz Can you guys answer this question of mine too?

Looking at the Search endpoint on the Developer Documentation https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-group-search

It looks as though you need to pass a cqlcontext query parameter to the endpoint as an object.

https://your-domain.atlassian.net/wiki/rest/api/search?cql=type=page&cqlcontext=%7B%22contentStatuses%22%3A%5B%22current%22%5D%7D

I found that I needed to URLEncode the entire object but this is what it looks like without the encoding:

{"contentStatuses":["current"]}

Content statuses is an array of statuses as you can pass multiple.