Updated on September 26, 2024

Mask Async

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

Endpoint: https://trial.protecto.ai/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",
            "attributes":"Name",
            "token_name":"Text token"
        },
        {
            "value": "123/899 - Main Street, Anytown, USA-12345",
            "format": "Address",
            "attributes":"Name",
            "token_name":"Text token"
        },
        {
            "value": "(408)- 426 - 9989",
            "format": "Phone Number",
            "attributes":"Name",
            "token_name":"Numeric token"
        },
        {
            "value": "John.mathew@gmail.com",
            "format": "Email address",
            "attributes":"Name",
            "token_name":"Text token"
        },
        {
            "value": "Rah@singlecrm.sss.com",
            "format": "Email address",
            "attributes":"Name",
            "token_name":"Text token"
        }
    ]
}

 

Response:

Upon successful masking, you will receive a response with the masked data with tracking id . Here’s an example of a response:

If the status is Pending, try again after a few minutes to see if the data has been processed(Success)

Response:

{
    "data": [
        {
            "tracking_id": "17079670-e3a1-4643-b821-59f7b3c7824a26092024151238",
            "status": "PENDING"
        }
    ],
    "success": true,
    "error": {
        "message": ""
    }
}

 

What are your feelings?
Scroll to Top