Redacting Sensitive Data From Text Content

You can use the code samples below to redact sensitive data from a string of text. You can also feed information to the API using JSON over HTTP.

The API takes the following as arguments:

  • A string of text
  • The placeholder text that will replace sensitive data (in this example, "REDACTED")
  • A list of one or more InfoTypes that you want to redact

It returns the string with any sensitive data replaced by your chosen placeholder.

Send feedback about...

Data Loss Prevention API