Overview
JSON (JavaScript Object Notation) has become a highly used interchange format because it is lightweight, simple, and easy to read and write. Many REST APIs, including Atlassian REST APIs, return JSON format which makes it ideal for scripting output.
...
Warning |
---|
Parameters removed |
...
Macro Editor Label | Default | Description | Macro Parameter | ||
---|---|---|---|---|---|
Paths to fields | Specify a single path to generate a single table. Simple form is a dot separated list of field names to reach the specific field within the JSON string. Example: total.monthlies. When a comma separated list of paths to fields is provided, a table is produced for each valid field identified in the path. No table is produced for references to fields that cannot be found, are empty arrays, or similar. Paths are expressed in JSONPath syntax. | paths | |||
Paths to fields to be included | all fields | Enter a comma separated list of paths to fields to be included in the output. Paths are relative to the JSON field specified in the paths parameter. If not specified, all fields found are included. Example for the issues field from the Jira search REST API: | fieldPaths | ||
Regex patterns for ordering fields | Enter a comma separated list of regular expression (regex) patterns. This parameter is used only when the Paths to fields to be included field defaults to all fields; otherwise, the order specified in Paths to fields to be included is used. Useful when multiple tables are generated and column ordering is not ideal. Field order is not specific in JSON strings so when field order is important, these regex patterns can be used to control the order.
| fieldOrderRegexPatterns | |||
Paths to be used to determine sort order | Enter a comma separated list of path references to fields (simple only) to be used to determine how rows are initially sorted. Paths are relative to the JSON field specified in the Paths to fields parameter. If specified, JSON array elements are sorted based on the comparison of field values represented by the paths. The first path is the primary sort value. Subsequent paths are used only if the first comparison is equal. The sort direction is ascending unless Sort descending is selected. This sorting is done before the HTML is generated for display. | sortPaths | |||
Strip leading qualifiers from generated headings | false | Enable to make table heading columns look better by stripping leading qualifiers (using a dot separator (.)) for names generated as a result of Paths to fields to be included. For example, field.type would be converted to type. | stripQualifiers | ||
Capitalize first character of generated headings | true | Enable to make table heading columns look better by capitalizing leading character of names generated as a result of Paths to fields to be included. | capitalize | ||
Output format | html | Specify how the output is formatted. The options are as follows:
| output | ||
Location of JSON data | macro body | Specifies the list of options where JSON data is located. The included data follows the body data based on the location selected. The possible options are:
| location | ||
Profile | Enter the profile name from the list of pre-configured profiles. Contact your administrator to know about the profiles available for your use. Refer to the Configuration documentation to learn more about profile configuration. | profile | |||
URL to JSON data | Enter the URL containing the required JSON that are to be processed and rendered. If specified, the included data follows the body and script data. | url | |||
URL connection timeout (milliseconds) | Enter time in milliseconds such that URL connections do not timeout before getting data. Use this to increase time needed for slow connections. Note that if a zero is given the connection may wait infinitely. | timeout | |||
Augments to data row values | Enter a comma separated list of augments to the data row values, one for each column. Specify double quotes for values with a comma. See Augments for details. | augments | |||
Augments to heading row values | Enter a comma separated list of augments to heading row values, one for each column. See Augments for details. | headingAugments | |||
Augments to footing row values | Enter a comma separated list of augments to footing row values, one for each column. See Augments for details. | footingAugments | |||
Show wiki | false | Enable this option to show a non-formatted version of the wiki table following the formatted table. This is used to help resolve formatting issues. It can also be used to convert CSV to Confluence markup by cut and paste. | showWiki | ||
Escape special characters in wiki markup | false | Enable this option to allow few special characters to be escaped so that the formatting is unaffected. When wiki output is requested (Output format is set to wiki), some special characters (like '|', '[', ']', '{', '}') in data can cause undesirable formatting of the table. By default, data that has wiki markup is rendered correctly. | escape | ||
File encoding | System default | Specify the encoding for an external file, if different from the Confluence default (like Windows-1252, UTF-8, MacRoman). Refer to this article for more information. Example: UTF-8. | encoding | ||
Render wiki markup macros in body | false | Enable this option to render wiki markup macros found in the body prior to processing as CSV. This is useful to run macros from apps such as Scripting for Confluence, Run CLI Actions in Confluence, SQL for Confluence, or similar, that can produce CSV output. | macros |
...