Redact text strings

You can use the Tonic Textual REST API to redact text strings, including:

  • Plain text

  • JSON

  • XML

  • HTML

Textual provides a specific endpoint for each format. For JSON, XML, and HTML, Textual only redacts the text values. It preserves the underlying structure.

List entity types

get

Returns the full list of built-in entity types that the redaction engine can detect and transform.

Responses
chevron-right
200

OK

application/json

The type of personally identifiable information (PII) detected, such as NAME_GIVEN, EMAIL_ADDRESS, or CREDIT_CARD.

itemsstring · enumOptional

The type of personally identifiable information (PII) detected, such as NAME_GIVEN, EMAIL_ADDRESS, or CREDIT_CARD.

Possible values:
get
/api/Redact/pii_types
200

OK

Plain text

post

Returns a modified version of the provided text string that redacts or synthesizes the detected entity values.

Body

Request to redact PII from plain text.

Responses
chevron-right
200

OK

application/json

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post
/api/Redact

Bulk plain text

post

Returns a modified version of the provided text strings that redacts or synthesizes the detected entity values. Processes multiple text strings in parallel.

Body

Request model for bulk plain text redaction.

Responses
chevron-right
200

OK

application/json

The result of a bulk redaction operation, containing the original texts, redacted texts, and details of each entity replacement.

bulkTextstring[]Optional

The original input texts before redaction.

bulkRedactedTextstring[]Optional

The texts after redaction has been applied.

usageinteger · int64Optional

The total number of words processed across all texts.

post
/api/Redact/bulk
200

OK

JSON

post

Returns a modified version of the JSON that redacts or synthesizes the detected entity values. The redacted JSON has the same structure as the input JSON. Only the primitive JSON values, such as strings and numbers, are modified. Optionally, provide an array of JSONPath expressions in jsonPathIgnorePaths to exclude specific values from redaction.

Body

Request to redact PII from a JSON document.

Responses
chevron-right
200

OK

application/json

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post
/api/Redact/json

XML

post

Returns a modified version of the XML that redacts or synthesizes the detected entity values. The redacted XML has the same structure as the input XML. Only the XML inner text and attribute values are modified.

Body

Request to redact PII from an XML document.

Responses
chevron-right
200

OK

application/json

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post
/api/Redact/xml

HTML

post

Returns a modified version of the HTML that redacts or synthesizes the detected entity values. The redacted HTML has the same structure as the input HTML. Only the text contained in the HTML elements is modified.

Body

Request to redact PII from an HTML document.

Responses
chevron-right
200

OK

application/json

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post
/api/Redact/html

Last updated

Was this helpful?