Skip to main content
Skip table of contents

Character mapping

See Character Mapping for more information about this algorithm framework.

Creating a character mapping algorithm via API

  1. Retrieve the frameworkId for the Character Mapping Framework. This information can be retrieved using the following endpoint:

    CODE
    algorithm   GET /algorithm/frameworks

    The framework information should look similar to the following:

    CODE
    {
        "frameworkId": 8,
        "frameworkName": "Chracter Mapping",
        "frameworkType" : "STRING",
        "plugin" :
        {
            "pluginId" : 7,
            "pluginName" : "dlpx-core"
        }
    }
  2. Create a Character Mapping algorithm instance via the following endpoint:

    CODE
    algorithm   POST /algorithms

    Configure a new algorithm using the JSON formatted input similar to the following:

    CODE
    {
        "algorithmName": "Digits and A to F",
        "algorithmType": "COMPONENT",
        "frameworkId": 8,
        "algorithmExtension": {
            "caseSensitive": true,
            "preserveRanges": null,
            "characterGroups": [
                "0123456789", "[a-fA-F]"
            ],
        "minMaskedPositions": 1,
        "preserveLeadingZeros": false
    }

Character mapping algorithm extension

  • characterGroups(required, no default)

Array of Strings A list of String values defining the characters to be masked. Each group must be either: - a Java regex style character group beginning with '[' - a String of the literal characters that comprise the group.

Duplication of characters within or among groups is not permitted.

  • caseSensitive(default=true)

Boolean Whether the mapping should be case sensitive. When this is false, each group must be composed either: entirely of characters having no case; or of pairwise matching sets of LC and UC characters - example: [a-zA-Z], not [a-bC-D].

  • minMaskedPositions(default=1, minimum=0)

Integer The minimum number of positions that must be replaced for masking to be considered successful. Non-conformant data handling is triggered whenever fewer positions are masked. Inputs containing only whitespace never trigger non-conformant data handling.

  • preserveRanges(optional)

Array of PreserveRange objects A list of PreserveRange objects specifying regions of maskable characters to be preserved. Only maskable characters are considered when determining whether a position is preserved. Ranges are specified with position 0 representing the first maskable character.

  • preserveLeadingZeros(default=false)

Boolean Whether to preserve leading '0' characters. This option may only be used when '0' is a masked character, and may not be used in conjunction with preserveRanges.

Character Mapping PreserveRange extension

  • start(minimum=0, required, no default)

Integer The starting position of the preserve range, indexed starting with 0.

  • length(minimum 1, required, no default)

Integer The length of the preserve range.

  • direction(default="FORWARD")

String Defines the processing direction for this preserve range, with FORWARD starting at the beginning of input, and REVERSE starting at the end. Possible enum values: - FORWARD - process left to right - REVERSE - process right to left

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.