The asynchronous masking technique assists in concealing large volumes of data.
Utilizing this method enables you to submit a mask request and receive a tracking ID. The tracking ID can then be employed to retrieve the status of the submitted request.
Endpoint and Authentication: #
To use Protecto.ai’s token-based masking, you need to send a PUT request to the following endpoint:
METHOD: PUT
Route: api/vault/mask/async
For authentication, include the following token in the request headers:
Headers: {“Authorization”: “Bearer <AUTH_TOKEN>”}
Request Payload: #
Here’s an example of a request payload
Request Payload:
{
"mask": [
{
"value": "https://platform.openai.com/playground/chat?models=gpt-4o",
"format": "URL",
"token_name":"Text token"
},
{
"value": "123/899 - Main Street, Anytown, USA-12345",
"format": "Address",
"token_name":"Text token"
},
{
"value": "(408)- 426 - 9989",
"format": "Phone Number",
"token_name":"Numeric token"
},
{
"value": "John.mathew@gmail.com",
"format": "Email address",
"token_name":"Text token"
},
{
"value": "Rah@singlecrm.sss.com",
"format": "Email address",
"token_name":"Text token"
}
]
}
Response: #
Upon successful masking, you will receive a response with the masked data with tracking id with Pending Status. Here’s an example of a response:
Response:
{
"data": [
{
"tracking_id": "17079670-e3a1-4643-b821-59f7b3c7824a26092024151238",
"status": "PENDING"
}
],
"success": true,
"error": {
"message": ""
}
}
Note: You can provide the Tracking ID in the Async API to check the status, whether it is Success or Failed.