41da8739a690
Plain text
Returns a modified version of the provided text string that redacts or synthesizes the detected entity values.
Request body
A dictionary of entity types to their transformation type.
A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.
A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.
A dictionary mapping entity type names to their transformation metadata configuration.
A list of custom Pii Entity names to use for NER
Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.
Optional per-entity minimum detection confidence thresholds for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); each value is in (0, 1], and detections for that entity whose score falls below it are ignored. Omit to keep today's behavior of no confidence cutoff. Supplying a key that does not match any requested custom-PII or model-based entity Name, or a value outside (0, 1], is rejected as a 400 error.
The plain text to redact
Example request
{
"generatorConfig": {
"NAME_GIVEN": "Redaction",
"NAME_FAMILY": "Redaction"
},
"labelBlockLists": {
"NAME_FAMILY": {
"regexes": [
".*\\s(disease|syndrom|disorder)"
]
}
},
"labelAllowLists": {
"HEALTHCARE_ID": {
"regexes": [
"[a-z]{2}\\d{9}"
]
}
},
"customEntityRankingModes": {
"MY_CUSTOM_ENTITY": "Standard"
},
"customEntityConfidenceThresholds": {
"MY_CUSTOM_ENTITY": 0.5
},
"text": "My name is John Smith"
}Response
Returns the redacted text
The original input text before redaction.
The text after redaction has been applied.
The number of words processed.