Operations (sample payloads)

Main operations
Copy

Mask Sensitive Data
Copy

Takes a string and replaces sensitive data with a mask id.

Sample Input

1
{
2
"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.",
3
"language": "en",
4
"minimumScore": 0.9
5
}

Sample Output

1
{
2
"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].",
3
"entities": [
4
{
5
"score": 0.98,
6
"type": "NAME",
7
"begin": 11,
8
"end": 19
9
},
10
{
11
"score": 0.99,
12
"type": "EMAIL",
13
"begin": 34,
14
"end": 53
15
},
16
{
17
"score": 0.97,
18
"type": "CREDIT_DEBIT_NUMBER",
19
"begin": 78,
20
"end": 97
21
},
22
{
23
"score": 0.95,
24
"type": "CREDIT_DEBIT_EXPIRY",
25
"begin": 114,
26
"end": 119
27
}
28
],
29
"maskMap": {
30
"NAME_1": "John Doe",
31
"EMAIL_1": "johndoe@example.com",
32
"CREDIT_DEBIT_NUMBER_1": "4111-1111-1111-1111",
33
"CREDIT_DEBIT_EXPIRY_1": "12/25"
34
}
35
}

Unmask Sensitive Data
Copy

Given text which has been previously masked and a map of masking entities, unmask the text.

Sample Input

1
{
2
"text": "Hello, my name is [PERSON_1] and my email is [EMAIL_1]. My credit card number is [CREDIT_CARD_1].",
3
"maskMap": {
4
"PERSON_1": "John Doe",
5
"EMAIL_1": "johndoe@example.com",
6
"CREDIT_CARD_1": "4111111111111111"
7
}
8
}

Sample Output

1
{
2
"text": "Hello, my name is John Doe and my email is johndoe@example.com. My credit card number is 4111111111111111."
3
}