Operations (sample payloads)
Main operations
Mask Sensitive Data
Takes a string and replaces sensitive data with a mask id. Sample Input
\{
"input": "My name is John Doe and my email is johndoe@example.com. My credit card number is 4111-1111-1111-1111 and it expires on 12/25.",
"language": "en",
"minimumScore": 0.9
\}
Sample Output
{
"text": "My name is [NAME_1] and my email is [EMAIL_1]. My credit card number is [CREDIT_DEBIT_NUMBER_1] and it expires on [CREDIT_DEBIT_EXPIRY_1].",
"entities": [
\{
"score": 0.98,
"type": "NAME",
"begin": 11,
"end": 19
\},
\{
"score": 0.99,
"type": "EMAIL",
"begin": 34,
"end": 53
\},
\{
"score": 0.97,
"type": "CREDIT_DEBIT_NUMBER",
"begin": 78,
"end": 97
\},
\{
"score": 0.95,
"type": "CREDIT_DEBIT_EXPIRY",
"begin": 114,
"end": 119
\}
],
"maskMap": \{
"NAME_1": "John Doe",
"EMAIL_1": "johndoe@example.com",
"CREDIT_DEBIT_NUMBER_1": "4111-1111-1111-1111",
"CREDIT_DEBIT_EXPIRY_1": "12/25"
\}
}
Unmask Sensitive Data
Given text which has been previously masked and a map of masking entities, unmask the text. Sample Input
{
"text": "Hello, my name is [PERSON_1] and my email is [EMAIL_1]. My credit card number is [CREDIT_CARD_1].",
"maskMap": \{
"PERSON_1": "John Doe",
"EMAIL_1": "johndoe@example.com",
"CREDIT_CARD_1": "4111111111111111"
\}
}
Sample Output
\{
"text": "Hello, my name is John Doe and my email is johndoe@example.com. My credit card number is 4111111111111111."
\}