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
200

OK

application/json
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
200

OK

application/json
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
200

OK

application/json
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
200

OK

application/json
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
200

OK

application/json
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
200

OK

application/json
post
/api/Redact/html
200

OK

Last updated

Was this helpful?