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.

Returns a list of supported entity types

get
Responses
chevron-right
200

OK

application/json
itemsstring · enumOptionalPossible values:
get
/api/Redact/pii_types
200

OK

Redact entities in plain text

post

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

Body
Responses
chevron-right
200

OK

application/json
originalTextstringOptional
redactedTextstringOptional
usageinteger · int64Optional
post
/api/Redact
200

OK

Redact plain text entities in bulk

post

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

Body
Responses
chevron-right
200

OK

application/json
bulkTextstring[]Optional
bulkRedactedTextstring[]Optional
usageinteger · int64Optional
post
/api/Redact/bulk
200

OK

Redact entities in JSON and preserve the JSON structure

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.

Body
Responses
chevron-right
200

OK

application/json
originalTextstringOptional
redactedTextstringOptional
usageinteger · int64Optional
post
/api/Redact/json
200

OK

Redact entities in XML and preserve the XML structure

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
Responses
chevron-right
200

OK

application/json
originalTextstringOptional
redactedTextstringOptional
usageinteger · int64Optional
post
/api/Redact/xml
200

OK

Redact entities in HTML and preserve the HTML structure

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
Responses
chevron-right
200

OK

application/json
originalTextstringOptional
redactedTextstringOptional
usageinteger · int64Optional
post
/api/Redact/html
200

OK

Last updated

Was this helpful?