This page describes how to migrate custom content modules from Connect to Forge while preserving existing content and ensuring backward compatibility.
Refer to the Confluence custom content documentation for more details about this module.
When migrating from Connect to Forge, you can preserve existing custom content by using the migratedFromConnect
property. This allows your Forge app to continue working with custom content that was originally created by your Connect app.
If migratedFromConnect: true
is defined in your Forge custom content module, new content for that module will continue to use the Connect type format (ac:[ADDON_KEY]:[MODULE_KEY]
), ensuring compatibility with existing content. When making GET or POST requests to the custom content API:
If migratedFromConnect: true
:
ac:
type will return / create content with the ac:
typeforge:
type will return / create content with the ac:
typeWhen migratedFromConnect
is not specified:
ac:
type will fail with 400 response codeforge:
type will return / create content with the forge:
typeYou may use Forge custom content as container or child custom content, regardless of whether migratedFromConnect
is defined on the container or child content.
When using migratedFromConnect
, you cannot scope custom content to a particular Forge environment. If you need separate custom content per Forge app environment on the same site, you must either create a separate app or define a new custom content key.
To migrate custom content from Connect to Forge, move your custom content definition from the connectModules
section to the modules
section in your manifest.yml
file. Add migratedFromConnect: true
to preserve the existing Connect custom content. Any container or child references to custom content can be replaced with this:[MODULE_KEY]
.
Before:
1 2connectModules: confluence:customContent: - key: customer name: value: Customers apiSupport: supportedContainerTypes: - space supportedChildTypes: - ac:my-connect-app:child #... - key: child name: value: Child apiSupport: supportedContainerTypes: - ac:my-connect-app:customer #... app: id: ari:cloud:ecosystem::app/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee connect: key: my-connect-app remote: connect
After:
1 2modules: confluence:customContent: - key: customer supportedContainerTypes: - space supportedChildTypes: - this:child title: Customer resource: frontend migratedFromConnect: true - key: child supportedContainerTypes: - this:customer title: Child resource: frontend migratedFromConnect: true app: id: ari:cloud:ecosystem::app/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee connect: key: my-connect-app remote: connect
Rate this page: