Skip to content

Date Replacement

See Date Replacement for more information about this algorithm framework.

Creating a Date Replacement Algorithm via API

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

    algorithm   GET /algorithm/frameworks
    

    The framework information should look similar to the following:

    {
        "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:

    algorithm   POST /algorithms
    

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

    {
        "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.