v1

latestOpenAPI 3.0.02026-08-064311,0881.3 MB
dataMaskingManagement

Test and preview a regex pattern by evaluating it against sample input text. Optionally provide a maskString to use as the replacement for text that matches the regex.

Evaluate a regex pattern against input text. This endpoint can be used to test regex patterns for data masking rules. You can provide your own mask string which will be used for masking, otherwise it will be masked with default value of ##redactedPII##. The response includes the masked text, match count, and positions of matches in the masked output text.

post/v1/dataMaskingRules/evaluate

Request body

regexPatternstring required

Regex pattern used to identify substrings to mask.

maskStringstring nullable

Optional mask string. If null or empty, the service may apply a default mask string.

textstring required

Sample message used for masking evaluation.

Example request

{
  "regexPattern": "\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\b",
  "maskString": "EMAIL_REDACTED",
  "text": "2026-04-21 INFO User 192.168.1.1 logged in at 10.0.0.1"
}

Response

Evaluation result for the provided sample message.

maskedTextstring required

Message after applying masking.

matchCountinteger required

Number of replaced matches.

Example response

{
  "maskedText": "2026-04-21 INFO User ##redactedPII## logged in at ##redactedPII##",
  "matchCount": 2,
  "matchPositions": [
    {
      "start": 21,
      "end": 36
    }
  ]
}