I’ve built a Forge app which is storing its contents with custom content entities via REST API v2 as described here: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content/#api-group-custom-content
My sanitized manifest.yml looks like:
app:
runtime:
name: nodejs22.x
memoryMB: 256
architecture: arm64
id: <my-app-id>
permissions:
scopes:
- 'read:confluence-props'
- 'write:confluence-props'
- 'read:custom-content:confluence'
- 'write:custom-content:confluence'
- 'delete:custom-content:confluence'
modules:
confluence:spacePage:
- key: 'space-page'
render: 'native'
resource: 'space-page'
title: 'Glossary'
resolver:
function: 'resolver'
route: 'glossary'
confluence:customContent:
- key: 'entry-page'
render: 'native'
resource: 'entry-page'
title: 'Glossary Entry'
bodyType: 'storage'
supportedContainerTypes:
- 'space'
supportedChildTypes:
- 'attachment'
supportedSpacePermissions:
- 'read'
- 'create'
- 'delete'
indexing: true
preventDuplicateTitle: true
function:
- key: 'resolver'
handler: 'index.handler'
resources:
- key: 'space-page'
path: 'src/frontend/space-page/index.tsx'
- key: 'entry-page'
path: 'src/frontend/entry-page/index.tsx'
As you can see, the indexing:true setting for confluence:customContent is enabled. In my (backend) resolver, which gets called via invoke("...") I am having a creation call for the custom entity like:
const contentResponse = await api.asUser().requestConfluence(
route`/wiki/api/v2/custom-content`,
{
method: 'POST',
body: JSON.stringify({
spaceId: context.extension.space.id,
type: getTypeFromProductContext(context),
title: entryModel.term,
body: {
representation: 'atlas_doc_format',
value: JSON.stringify(
buildAdfBodyForEntry(entryModel),
),
},
}),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
},
);
Everything works as expected, I’m using the term property as title for the custom content and put a valid ADF document into the body of the custom content. Additionally, I’m also saving the JSON structure as corresponding content property.
I’ve also tried to fetch the custom content via the REST API with both methods, asUser() and asApp() and a CQL query just like:
const response = await api.asApp().requestConfluence(
route`/rest/api/content/search/?cql=type = "forge:<APP_ID>:<ENV_ID>:<MODULE_KEY>" AND space = "<SPACE_ID>"`,
{
headers: {
Accept: 'application/json',
},
},
);
This also returns the custom content entities in results block.
—
So my question is: Why are these custom-content entities, which should be indexable just like pages, blog posts etc., not showing up in the search results of confluence? Thanks for your help!