Updated on August 26, 2024

Sending policy name in mask API (Identify and mask)

This API will identify and mask the personal data elements in the given text using the metadata associated with the specified policy. If no policy is specified, it will use the default metadata configuration.
METHOD: PUT
ROUTE: /mask
Headers:
{
“Authorization”: “Bearer <NAMESPACE_USER_API_KEY >”
}

Request payload:

{ "policy_name": "Anonymization-policy-1",
"mask": [
{
"value": "George Williams lives in Washington"
}
]
}

Response structure:

{
"data": [
{
"value": "George Williams lives in Washington",
"token_value": "<PER>hSw8kAEB10 ITItAd8FsN</PER> lives in <ADDRESS>748785848000</ADDRESS>",
"toxicity_analysis": {
Date: 31/07/2024 Version: v1.2
PROTECTO DOCUMENTATION
"toxicity": 0.00088834815,
"severe_toxicity": 0.000104515464,
"obscene": 0.00018257574,
"threat": 0.0001108902,
"insult": 0.00017547917,
"identity_attack": 0.00013806517
},
"individual_tokens": [
{
"value": "George Williams",
"pii_type": "PERSON",
"token": "hSw8kAEB10 ITItAd8FsN",
"prefix": "<PER>",
"suffix": "</PER>",
"start_pos": 0,
"end_pos": 15
},
{
"value": "Washington",
"pii_type": "ADDRESS",
"token": "748785848000",
"prefix": "<ADDRESS>",
"suffix": "</ADDRESS>",
"start_pos": 25,
"end_pos": 35
}
]
}
],
"success": true,
"error": {
"message": ""
}
}

 

What are your feelings?
Scroll to Top