Hello,
I’m trying to add a new content property to Confluence Cloud pages and later use it in CQL search.
If I understand correctly, this custom content property should be indexed in order to be searchable: https://developer.atlassian.com/server/confluence/content-properties-in-the-rest-api/#index-schema-definition
I’ve added following content property to a page using REST API(rest/api/content/{{id}}/property):
{
"key": "ms-nav-product-id",
"value": {
"id": "123ABC"
}
}
but I get an error when I try searching for it with REST API(rest/api/content/search?cql=content.property%5Bms-nav-product-id%5D.value.id=123-ABC).
"message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : content.property[ms-nav-product-id].value.id=123-ABC"
I’ve tried different CQL searches (.value; .id; etc), but still get BadRequestException: Could not parse cql, so my guess is that I have to properly index the content property first.
How do you define Index schema for content properties through REST API?!
Thanks,
Raimo