Documentation
Macro Input Parameter
Describes a parameter input field for a macro.
Any declared parameters must also be included in the URL value of the macro in order to serialise this value. For
example, for a macro with a parameter view it should be added to the macro url as follows:
"dynamicContentMacros": [{
...
"url": "/render-map?pageTitle={page.title}&viewChoice={view}",
...
}]
Example
{
"parameters": [
{
"identifier": "view",
"name": {
"value": "Map View"
},
"description": {
"value": "Allows switching between view types"
},
"type": "enum",
"required": true,
"multiple": false,
"defaultValue": "Map",
"values": [
"Map",
"Satellite"
]
}
]
}
Properties
name
Type
Required
Description
The human readable name of the parameter which will be displayed in the UI.
identifier
Type
string[-_a-z0-9\.]+Required
Description
A unique identifier for the parameter. It has to be all lowercase, and must not contain any spaces. This identifier will be used in the query parameters of the add-on URL.
type
Type
stringRequired
Description
The type of parameter.
Currently the following parameter types are supported in the macro browser's UI:
attachment: displays an autocomplete field for search on attachment filenames.boolean: displays a check box.confluence-content: displays an autocomplete field for search on page and blog titles.enum: displays a select field.spacekey: displays an autocomplete field for search on space names.string: displays an input field (this is the default if unknown type).username: displays an autocomplete field for search on username and full name.
aliases
Type
string, … ]Description
Aliases for the macro parameter.
defaultValue
Type
stringDescription
The default value for the parameter.
description
Type
Description
The description of the parameter
multiple
Type
booleanDefaults to
falseDescription
Whether it takes multiple values.
required
Type
booleanDefaults to
falseDescription
Whether it is a required parameter.
values
Type
string, … ]Description
Describes the enum values - only applicable for enum typed parameters.