This property allows you to specify the container types your custom content can appear in, and its supported child content types. It also allows you to enable indexing of your custom content.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"bodyType": "storage",
"supportedContainerTypes": [
"space",
"page"
],
"supportedChildTypes": [
"attachment",
"comment"
],
"supportedSpacePermissions": [],
"preventDuplicateTitle": false,
"indexing": {
"enabled": true
}
}
In the above example, you'll see we specify content type keys in the supportedContainerTypes
and supportedChildTypes
fields.
There are 2 categories of content type you can reference \u2013 built-in content and custom content.
space
or a page
comment
or a child attachment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"bodyType": "storage",
"supportedContainerTypes": [
"space",
"page"
],
"supportedChildTypes": [
"attachment",
"comment"
],
"supportedSpacePermissions": [],
"preventDuplicateTitle": false,
"indexing": {
"enabled": true
}
}
type1
or type2
, defined in the app with the key my-first-addon
type1
or type2
, defined in the app with the key my-second-addon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"bodyType": "storage",
"supportedContainerTypes": [
"ac:my-first-addon:type2",
"ac:my-first-addon:type1"
],
"supportedChildTypes": [
"ac:my-second-addon:type1",
"ac:my-second-addon:type2"
],
"supportedSpacePermissions": [],
"preventDuplicateTitle": false,
"indexing": {
"enabled": true
}
}
raw
.1 2 3 4 5 6 7 8 9 10 11 12 13
{
"bodyType": "raw",
"supportedContainerTypes": [
"space"
],
"supportedChildTypes": [],
"supportedSpacePermissions": [],
"preventDuplicateTitle": false,
"indexing": {
"enabled": true
}
}
Content with a raw body looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13
{
"title": "My title",
"space": {"key": "DS"},
"type": "ac:add-on-key:module-key",
"body": {
"raw": {
"value": "{\"field\": \"value\"}",
"representation": "raw"
}
}
}
supportedContainerTypes
Type | |
Required | Yes |
Description | Defines types that this custom content can be contained in.
|
bodyType
Type | |
Defaults to | storage |
Allowed values |
|
Description | Defines the content body type of this custom content. Currently supported content body types are:
|
indexing
Type | |
Description | Defines how this content type will be indexed Defines how this macro parameter will be indexed for site search 1 2 3 4
The macro parameter indexing property allows apps to hook into the mechanism by which Confluence populates its search index for site search. Each time macro is created or updated in Confluence, the value that is stored in the macro parameter will be added to the search index. The value of this macro parameter will also be used in displaying the excerpt text for search result. This is useful when the body of the macro is not searchable, for example: macros with |
enabled |
|
preventDuplicateTitle
Type | |
Defaults to | false |
Description | Defines whether Confluence should prevent content with duplicate title from being created in the same space or container. |
supportedChildTypes
Type | |
Description | Defines types that can be contained in this custom content.
|
supportedSpacePermissions
Type | |
Description | Defines the space permissions that this custom content supports.
Allowable values are : Otherwise the default permissions will be used. |
Rate this page: