DataMasque Portal

Bulk Ruleset Management

Overview

The Ruleset Management page allows you to export, import, and delete rulesets in bulk. To access this page, choose the Ruleset Management item from the main menu.

This is useful for transferring rulesets between DataMasque instances (e.g. from a development environment to production), or for backing up and restoring rulesets. Any ruleset libraries used by the exported rulesets are also included in the export.

Exporting rulesets

To export rulesets, select one or more rulesets using the checkboxes in the table, then click the Export button at the bottom of the page.

Any ruleset libraries referenced by the selected rulesets are automatically included in the export. When exporting all rulesets, all active libraries are included.

Check the Include seed files option to include any custom seed files referenced by the selected rulesets in the export archive. Built-in DataMasque seed files (prefixed with DataMasque_) are not included, as they are already available on all DataMasque installations.

The export will download a Zip archive containing the selected rulesets and their libraries in YAML format. This archive can be imported to any DataMasque instance using the import feature described below, or via the POST /api/import/v1/ API endpoint.

Importing rulesets

To import rulesets, click the Import icon in the top-right corner of the Ruleset Management page. A dialog will appear where you can upload a Zip archive previously exported from DataMasque.

Duplicate handling

The import dialog provides a Duplicate Handling section that controls how each resource type is handled when a matching item already exists. Each resource type (Rulesets, Ruleset Libraries, and Seed Files) has a dropdown with two options:

  • Replace current — any existing item that matches an imported item will be updated with the imported content.
  • Skip — existing items are left unchanged and the imported item is skipped.

The default setting is Replace current for Rulesets, and Skip for Ruleset Libraries and Seed Files.

Note: Archived rulesets and libraries (those that were previously deleted but retained due to run history) are always restored when they match an imported item, regardless of the duplicate handling setting.

How rulesets are matched

When importing from an archive that was exported from DataMasque, each ruleset is matched against existing rulesets by its original ID first, then by name if no ID match is found.

This means if you export a ruleset from one instance and import it to another, then later re-import an updated version, it will correctly update the same ruleset even if it has been renamed on the destination instance.

When importing from a manually created Zip archive (without a manifest.json), matching is done by name only.

How libraries are matched

When importing from an archive that was exported from DataMasque, each library is matched against existing libraries by its original ID first, then by namespace and name if no ID match is found.

When importing from a manually created Zip archive (without a manifest.json), matching is done by namespace and name only.

Import results

After the import completes, a results summary is displayed showing what happened to each ruleset, library, and seed file. You can download this summary as a CSV report using the Download Report button.

Each item will have one of the following statuses:

Status Description
Created No existing match was found, so a new item was created.
Updated An existing match was found and overwritten with the imported content.
Skipped An existing match was found, but overwrite was disabled so it was left unchanged.
Not Created An existing match was found with identical content, so no changes were needed.
Restored A previously deleted (archived) ruleset or library was restored and updated.
Error The import failed for this item. Check the message for details.

A successful import would look like this:

Import results

Deleting rulesets

To delete rulesets, select one or more rulesets using the checkboxes in the table, then click the Delete button at the bottom of the page. You will be prompted to confirm the action.

Note: Rulesets that have associated run history cannot be permanently deleted. They will be archived instead, which removes them from the ruleset list but preserves the run history for reference.