Stand with Ukraine 🇺🇦
Products
Services
Blog
About Us

Import / Export

Export

{"timestamp":1792799680346,"msg":"A unknown Exception Occurred","errorMsg":"The provided AtlassianHostUser did not specify a user to act as.","code":"500"}

User Macro provides you with the ability to export one or several macros from your Confluence. There are two ways to export a macro

  1. Check the macro you want to export, and press the Export button at the top of all macros

  2. Press three dots in Actions column, choose Export option

image-20241224-112937.png

It will create a JSON file with all info about your macro and automatically download it on your system with name export-{timestamp}.json. This file has the following structure:

[
  {
    "key": <string>,
    "name": <string>,
    "authorsInfo": [
      {
        "id": <string>,
        "name": <string>,
        "picturePath": <string>
      }
    ],
    "categories": [],
    "description": <string>,
    "usageCount": <integer>,
    "parameters": [],
    "documentation": <string>,
    "template": <string>,
    "macrosKey": <string>,
    "outputType": <string>,
    "bodyType": <string>,
    "hidden": <boolean>,
    "width": <string>,
    "height": <string>,
    "iconPath": <string>,
    "updatedAt": <integer>,
    "macroType": <string>,
    "enabled": boolean
  }
]

Import

One of the ways to register macro in Confluence is importing it. User can import one or several macros by pressing Import button on the main page and then choosing them on your system.

image-20241224-124032.png

After importing all of the macros will be registered in Confluence and be shown on your main page.

Import validation

Import would be accepted if the JSON file and macros object had a valid structure.

{"timestamp":1792799680391,"msg":"A unknown Exception Occurred","errorMsg":"The provided AtlassianHostUser did not specify a user to act as.","code":"500"}
  • JSON could consist of one macro object or an array of macros.

  • Macro structure should have the list of required fields filled properly; all other properties would be ignored. If the values of fields are invalid, a validation error will be shown:

image-20260506-192148.png

Macro Name and Key Requirements

  • Each macro must have a unique name and key to function correctly.

  • During import, new values are automatically generated based on the following rules:

    • A unique key is generated automatically.

    • If a macro name already exists or duplicates another macro in the import list, it will be updated with a unique hash.

    • Updated keys and names are displayed in the modal preview.

Keep Original Macro Key

  • The modal provides an option to retain the original macro key by selecting the Keep original macro key checkbox. This is particularly useful during migration to the cloud, as it prevents the need to update all pages containing the specific macro with a new key.

image-20260506-192259.png

Export User Macros from the Data Center

{"timestamp":1792799680392,"msg":"A unknown Exception Occurred","errorMsg":"The provided AtlassianHostUser did not specify a user to act as.","code":"500"}