Skip to main content

Uniphore Help Center Portal

Upload Redaction Configuration Details

This API allows to upload the modified redaction configuration details of an existing tenant.

Endpoint

Method: POST

URL: http://localhost:5001/custom_config

curl --location 'http://localhost:5001/custom_config' \
     --form 'lang="{language-code}"' \
     --form 'tenantId="{tenant-id}"' \
     --form 'environment="dev"' \
     --form 'file=@"/path/to/file/en_uss_dev.zip"'
Request Parameter

Parameter Name

Data Type

Description

Required/ Optional

lang

String

The code of be language for which redaction is required. {language-code}

Required

tenantId

String

Id of the tenant from the platform. {tenant-id}

Example: 1cbd8e5e-fc31-4443-986f-2e8ba3c0ad1d

Note

Contact PE Team to obtain the platform TenantID.

Required

environment

String

dev should be the default value for all environment.

Required

file

File

Enter the name of the zip file to be uploaded along with the path where the file is located.

The name of the zip file should be in {lang-code}_{tenant-id}_dev format.

Example: en_e957fbbe-1a1f-4895-a342-59aeaef92dl8_dev

Make changes to the existing file

Required

Example Request

A zip file containing the request needs to be uploaded. The name of the zip file will be in {lang-code}_{tenant-id}_dev format. Example: en_e957fbbe-1a1f-4895-a342-59aeaef92dl8_dev. The zip file contains the following two jscon files.

  • pii_all_custom.json include custom entities with context and regex, available for the specific tenant.

    • In language, enter the language code of the redaction configuration file.

    • In the context , enter the possible phrases used by BOT to mention the Entity in the conversation.

    • In the regex , mention the Regex patterns for the specific Entities to mask the associated Entity values as per customer requirement.

  • masking_config.json contains the redaction configuration details of custom entities available in the pii_all_custom.json.

    In all tenants, the credit_card, cvv_number, expiry_date and pin_number are redacted by default.

    The entity for which the replaceable parameter is set to true is allowed to be redacted. If the replaceable parameter is set to false then the specific entity will not be redacted. The replacement parameter should be defined as X in order to mask the original data.

    Caution

    Do not use any string other than “X” in "replacement": "X".

Sample - pii_all_custom.json
{
    "recognizers": {
        "ACCOUNT_NUMBER": {
            "value": {
                "entity": "ACCOUNT_NUMBER",
                "language": "en",
                "context": [
                    "account number",
                    "account id"
                ],
                "patterns": [{
                        "name": "code-regex",
                        "regex": "(?<!-)(\\b\\d{10}\\b)",
                        "score": 0.9
                    }
                ]
            }
        },
        "ZIP_CODE": {
            "value": {
                "entity": "ZIP_CODE",
                "language": "en",
                "context": [
                    "zip code",
                    "zip number"
                ],
                "patterns": [{
                        "name": "code-regex",
                        "regex": "(?<!-)(\\b\\d{5}\\b|\\b\\d{6}\\b)",
                        "score": 0.9
                    }
                ]
            }
        }
    },
    "analyze_template": {},
    "anonymize_template": {}
}
Sample - masking_config.json
{
    "field-map": {
        "credit_card": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "cvv_number": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "expiry_date": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "phone_number": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "email_address": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "pin_number": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "location": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "us_ssn": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "domain_name": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "account_number": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        },
        "zip_code": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        }
    },
    "allow_list": ["India", "Israel"]
}
NIL Redaction

When redaction is not required for a tenant then upload the zip file having the below given json files.

pii_all_custom.json for Nil Redaction
{
    "recognizers": {},
    "analyze_template": {},
    "anonymize_template": {}
}
masking_config for Nil Redaction
{
    "field-map": {
        "domain_name": {
            "replaceable": true,
            "replacement": "X",
            "character": true
        }
    },
    "allow_list": []
}