Now I want to test if the content type is available (assuming to get an empty array). Following the documentation again, I tried to send the following REST API request
Which leads to an 501 error saying "com.atlassian.confluence.api.service.exceptions.unchecked.NotImplementedServiceException: Cannot find custom content type : forge:${appId}:DEVELOPMENT:foo"
Any thoughts what might be wrong? Thanks in advance!
I encountered the same issue, but thanks to @FabianSiegel1’s instructive CQL search POC for custom content and the verbose error response from the search API, I realized that the content type structure is based on the actual environmentId rather than its name like DEVELOPMENT (note the undefined):
{
"statusCode": 400,
"data": {
"authorized": true,
"valid": true,
"errors": [],
"successful": true
},
"message":"com.atlassian.confluence.api.service.exceptions.BadRequestException: Unsupported value for type,
got: forge:41e6d8cb-f99c-4ef0-8289-287c29dc7cd0:undefined:foo,
expected one of : [
space, user, page, blogpost, comment, attachment,
forge:41e6d8cb-f99c-4ef0-8289-287c29dc7cd0:4a729d16-aa22-4ebb-8696-f71f42711908:foo
]"
}
Using the environmentId from useProductContext() as correctly documented above the respectively misleadingly example within Confluence custom content allows to create/update/delete/search custom content implemented with Forge
Hi @ppasler, we’re also just struggling to get the custom content type stuff up and running. When using the POC from @FabianSiegel1 (big thanks!!!) it works, but as soon as we change the container to a space (and nothing else), like for example:
…we get a rather less informative 400 bad request:
{
statusCode: 400,
data: {
authorized: true,
valid: false,
errors: [ [Object] ],
successful: false
},
message: 'com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not create content with type forge:c0c5f358-b5a9-435d-9a83-b1693b511434:ae8b9284-25c4-4d51-91ee-605f02b16bc0:custom'
}
Do you have an idea what could be wrong here? Are you able to create a custom content entity under a space successfully? Any hint would be highly appreciated.