Exporting and Importing System Tag Configurations
There may be times when you want to export or import the configuration of a System tag. Unlike regular tags from a Tag Provider, the built-in import and export functions are disabled for System tags.

Instead, you can use scripting functions to import or export the configurations you want. This is useful when migrating a Gateway to new hardware, backing up and restoring alarm configurations, or replicating settings across development, testing, and production environments.
Each example below uses a single alarm configured on the LicenseState tag, found in the Tag Browser under [System] > Gateway > LicenseState.

Exporting System Tag Configurations​
Exporting Tags in the System Provider​
This example exports the configurations for all the System tags in the System provider. To export a single tag instead, see Exporting a Targeted System Tag.
-
Open the Script Console in the Ignition Designer.

-
Use the system.tag.exportTags() function script below to export your System tags, replacing the
filePathparameter with the path you want to export to:Export System Tags ScriptfilePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\allSystemTags.json"
tagPaths = ["[System]"]
system.tag.exportTags(filePath, tagPaths)
The export creates a JSON file named allSystemTags.json at the specified path.
Exporting a Targeted System Tag​
You can also export a single System tag or a group of tags. This example exports only the LicenseState tag.
-
Open the Script Console in the Ignition Designer.

-
Use the system.tag.exportTags() function script below to export the LicenseState tag, replacing the
filePathparameter with the path you want to export to:Export LicenseState Tag ScriptfilePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\targetedSystemTag.json"
tagPaths = ["[System]Gateway/LicenseState"]
system.tag.exportTags(filePath, tagPaths)
The export creates a JSON file named targetedSystemTag.json at the specified path.
Importing System Tag Configurations​
Importing a configuration overwrites the existing settings on any matching System tags. The examples below use the JSON files created in the export examples, so make sure the file is accessible on the Gateway you are importing to.
Importing Tags from the System Provider​
This example imports the allSystemTags.json file from Exporting Tags in the System Provider. To import a single tag instead, see Importing a Targeted System Tag.
-
Open the Script Console in the Ignition Designer.

-
Use the system.tag.configure() function script below to import the allSystemTags.json file, replacing the
filePathparameter with the path to your .json file:Import allSystemTags.json File ScriptfilePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\allSystemTags.json"
tags = system.file.readFileAsString(filePath)
system.tag.configure("[System]", tags)
Your System tags are now updated with the imported configurations.
You may receive an error saying [Bad_AccessDenied("Insufficient Tag Provider Edit Permissions")] after importing all your configurations. This happens because the imported configurations may affect tags that:
- Do not exist
- Are not in the same location as the export system
- Cannot be edited, or are in folders that cannot be edited
The imported configurations still affect the System tags that are available and in the same directory.
Importing a Targeted System Tag​
This example imports the targetedSystemTag.json file from Exporting a Targeted System Tag.
-
Open the Script Console in the Ignition Designer.

-
Use the system.tag.configure() function script below to import the targetedSystemTag.json file, replacing the
filePathparameter with the path to your .json file:Import targetedSystemTag.json File ScriptfilePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\targetedSystemTag.json"
tags = system.file.readFileAsString(filePath)
# Unlike the previous example where all the System tags were imported to the [System] provider,
# you need to specify the exact directory where the targeted tag lives.
system.tag.configure("[System]Gateway", tags)
The specified System tag is now updated with the imported configuration.