Skip to main content
Skip table of contents

Date replacement

See Date Replacement for more information about this algorithm framework.

Creating a date replacement algorithm via API

  1. Retrieve the frameworkIdfor the Date Replacement 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": 1,
        "frameworkName": "Date Replacement",
        "frameworkType" : "LOCAL_DATE_TIME",
        "plugin" :
        {
            "pluginId" : 7,
            "pluginName" : "dlpx-core"
        }
    }
  2. Create a Date Replacement algorithm via the following endpoint:

    CODE
    algorithm   POST /algorithms

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

    CODE
    {
        "algorithmName": "exampleDateReplacementAlgorithm",
        "algorithmType": "COMPONENT",
        "frameworkId" : 1,
        "algorithmExtension" :
        {
            "minDate": "2020-01-01 00:00:00",
            "maxDate": "2021-01-01 00:00:00",
            "unit": "DAYS"
        }
    }

Date replacement algorithm extension

  • minDate

String A date representing the minimum value that an input can be masked to. The range is inclusive of this value.

  • maxDate

String A date representing the maximum value that an input can be masked to. The range is inclusive of this value.

  • unit(default="SECONDS")

String A unit of time that determines what the output is truncated to. For example, when the unit is set to days, the years, months, and days may change, but the hours, minutes, and seconds will always be 00:00:00. Unit options supported by this framework: days, hours, minutes, and seconds.

JavaScript errors detected

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

If this problem persists, please contact our support.