v1

latestOpenAPI 3.0.02026-08-064311,0881.3 MB
dataMaskingManagement

Create a new data masking rule.

Create a new data masking rule. The rule will be applied to search results at query time, replacing matches of the regex pattern with the specified mask string. Note: Changes to data masking rules may take up to 30 seconds to take effect.

post/v1/dataMaskingRules

Request body

descriptionstring

Optional description of the data masking rule. Provide context about what PII this rule masks and why it's needed.

regexPatternstring required

Regular expression pattern to match PII data that should be masked. The pattern must be valid according to Java regex syntax. All matches in search results will be replaced with the mask string. Required when creating a rule. When updating, if omitted the existing pattern is retained.

maskStringstring

The string to replace matched PII with. Defaults to '##redactedPII##' if not specified. Use descriptive mask strings like 'EMAIL_REDACTED' or 'PHONE_REDACTED' for clarity.

enabledboolean required

Whether the data masking rule is active. Only enabled rules are applied to search results. Set to false to temporarily disable a rule without deleting it.

namestring required

Name of the data masking rule. Use a name that makes it easy to identify the rule. Must be unique within the organization. This field is immutable and cannot be changed after creation.

Example request

{
  "description": "Masks email addresses in application logs",
  "regexPattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}\\b",
  "maskString": "EMAIL_REDACTED",
  "name": "Email Masking"
}

Response

The data masking rule has been created.

descriptionstring

Optional description of the data masking rule. Provide context about what PII this rule masks and why it's needed.

regexPatternstring required

Regular expression pattern to match PII data that should be masked. The pattern must be valid according to Java regex syntax. All matches in search results will be replaced with the mask string. Required when creating a rule. When updating, if omitted the existing pattern is retained.

maskStringstring

The string to replace matched PII with. Defaults to '##redactedPII##' if not specified. Use descriptive mask strings like 'EMAIL_REDACTED' or 'PHONE_REDACTED' for clarity.

enabledboolean required

Whether the data masking rule is active. Only enabled rules are applied to search results. Set to false to temporarily disable a rule without deleting it.

namestring required

Name of the data masking rule. Use a name that makes it easy to identify the rule. Must be unique within the organization. This field is immutable and cannot be changed after creation.

createdAtstring date-time required

Creation timestamp in UTC in RFC3339 format.

createdBystring required

Identifier of the user who created the resource.

modifiedAtstring date-time required

Last modification timestamp in UTC.

modifiedBystring required

Identifier of the user who last modified the resource.

idstring required

Unique identifier for the data masking rule.

Example response

{
  "description": "Masks email addresses in application logs",
  "regexPattern": "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}\\b",
  "maskString": "EMAIL_REDACTED",
  "name": "Email Masking",
  "createdAt": "2018-10-16T09:10:00Z",
  "createdBy": "0000000006743FDD",
  "modifiedAt": "2018-10-16T09:10:00Z",
  "modifiedBy": "0000000006743FE8",
  "id": "00000000FF42A0C3"
}