Unprotect (Preview)
METHOD: POST
ENDPOINT: https://api.playground.protegrity.com/v1/ai
DESCRIPTION:
Unprotect sensitive data in a given input, i.e. revert previously tokenized values to their original contents. Provided text must include tags to enable this transformation.
ATTRIBUTES:
data
(required) Input data to transform.
format
(required) Specify the format of the input data. Option text
covers unstructured text. Option csv
is used for processing comma-separated values. Accepts: [ text | csv ]
.
operation
(required) Type of operation to perform. Choose classify
to only detect and classify data. Option protect
deidentifies data. Option unprotect
restores de-identified data to its original values. Accepts: [ classify | protect | unprotect ]
OPTIONS:
mapping
(optional) Required when re-identifying csv payloads. Paste here the mapping received during the protection operation.
header_line
(optional) Specific to csv content only. Set to true
if the data includes a header line in the first row. Set to false
in case of the opposite. Accepts: [ true | false ]
. Defaults to false
.
SAMPLE REQUEST – TEXT
curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
"operation": "unprotect",
"format": "text",
"data": ["Hello, this is [PERSON]SQnnLOQMw TEwP[/PERSON] from Air Industries. Could you give me a call back to my mobile number [PHONE_NUMBER]025-016-8606[/PHONE_NUMBER]. Have a lovely day!"]
}'
SAMPLE RESPONSE – TEXT
{
"results": "Hello, this is Peregrine Grey from Air Industries. Could you give me a call back to my mobile number 212-456-7890. Have a lovely day!"
}
SAMPLE REQUEST – CSV
curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
"operation": "unprotect",
"options": {
"format": "csv",
"header_line": true,
"mapping": [
{
"classification": "US_SSN",
"column_index": 0
},
{
"classification": "CREDIT_CARD",
"column_index": 1
},
{
"classification": "IBAN_CODE",
"column_index": 2
},
{
"classification": "PHONE_NUMBER",
"column_index": 3
}
]
},
"data": ["Social Security Number,Credit Card Number,IBAN,Phone Number\n548-31-3268,602048102797043,FR17 5415 4336 25BG 3EBG U4OK O64,(654) 3308224\n481-70-3857,1230437596808,AL33 1240 7288 KAEY GAPM NLYC FNZG,(271) 2802977\n755-85-3665,8461740972061430,AT25 0533 9808 8046 3404,(335) 2981943\n557-54-6818,116202261366298390,FR34 2630 5071 38FB UG1H ECEM 902,(614) 1716660\n055-91-9942,888966093482491,DK05 9696 6634 8709 30,(888) 2741502\n964-99-0589,1163706741835754,CR80 1243 0722 7573 5790 0,(871) 3397725\n188-07-4113,4107600970907496,RS64 9873 7248 6702 7241 58,(699) 7510692\n296-61-1694,417282980942395,EE32 8302 5118 1829 2990,(651) 3698973\n979-08-3159,8471859640609227,IT99 D202 3280 0140 Z43I LNLL OOX,(902) 9747145\n"]
}'
SAMPLE RESPONSE – CSV
{
"results": "Social Security Number,Credit Card Number,IBAN,Phone Number\n589-25-1068,349384370543801,FR43 9255 4858 47BG 3EBG U4OK O18,(483) 9440301\n636-36-3077,4041594844904,AL50 8947 4215 KAEY GAPM NLYC FNZG,(113) 5143119\n748-82-2375,3558175715821800,AT34 4082 9269 0841 5702,(763) 5136237\n516-62-9861,560221027976015000,FR22 0068 7181 11FB UG8H ECEM 306,(726) 6031636\n121-49-9409,374283320982549,DK37 5687 8459 8060 79,(624) 9205200\n838-73-3299,5558216060144900,CR54 8952 8144 6403 4765 0,(356) 9479541\n439-11-5310,5048376143641900,RS76 6213 4824 0184 8983 74,(544) 5623326\n564-06-8466,162068942413568,EE51 6882 3443 7863 4703,(702) 6093849\n518-54-5443,3543019452249540,IT65 D000 3874 2801 Z15I LNLL OOX,(584) 8618371\n"
}
Last modified January 15, 2025