Updated on September 26, 2024

Async status

The asynchronous status method enables us to monitor the status of both masking and unmasking processes.The user has to give the tracking id of the mask or unmask Async as the input in the Request

This approach enables you to track the status of the asynchronous request you’ve submitted. The possible statuses include “SUCCESS”,”PENDING”,”IN-PROGRESS”,”FAILED” and “PURGED”

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/async-status

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:

{"status": [{"tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721"}]}

Result structure for status “Success” #

 

{
    "data": [
        {
            "tracking_id": "17079670-e3a1-4643-b821-59f7b3c7824a26092024151238",
            "call_type": "mask",
            "input_payload": {
                "mask": [
                    {
                        "attributes": "Name",
                        "format": "URL",
                        "token_name": "Text token",
                        "value": "https://platform.openai.com/playground/chat?models=gpt-4o"
                    },
                    {
                        "attributes": "Name",
                        "format": "Address",
                        "token_name": "Text token",
                        "value": "123/899 - Main Street, Anytown, USA-12345"
                    },
                    {
                        "attributes": "Name",
                        "format": "Phone Number",
                        "token_name": "Numeric token",
                        "value": "(408)- 426 - 9989"
                    },
                    {
                        "attributes": "Name",
                        "format": "Email address",
                        "token_name": "Text token",
                        "value": "Rahul.kumar@nokia.com"
                    },
                    {
                        "attributes": "Name",
                        "format": "Email address",
                        "token_name": "Text token",
                        "value": "Rahul.kumar@singlecrm.nokia.com"
                    }
                ]
            },
            "result": [
                {
                    "attributes": "Name",
                    "format": "Url",
                    "token_name": "Text Token",
                    "token_value": "ooYxG://yFm3aGfq.AqfYIp.akT2Q/NBEjXBhtqL/HKdhW?Ke2LhD=vfXs1z",
                    "value": "https://platform.openai.com/playground/chat?models=gpt-4o"
                },
                {
                    "attributes": "Name",
                    "format": "Address",
                    "token_name": "Text Token",
                    "token_value": "Oa1eE/h34hF - N6PxU DegonD, 8qV2wIG, KKklu-lLjwX",
                    "value": "123/899 - Main Street, Anytown, USA-12345"
                },
                {
                    "attributes": "Name",
                    "format": "Phone Number",
                    "token_name": "Numeric Token",
                    "token_value": "(57047)- 01330 - 77732",
                    "value": "(408)- 426 - 9989"
                },
                {
                    "attributes": "Name",
                    "format": "Email Address",
                    "token_name": "Text Token",
                    "token_value": "BXx13.K6Jp6@h9vJ1.akT2Q",
                    "value": "Rahul.kumar@nokia.com"
                },
                {
                    "attributes": "Name",
                    "format": "Email Address",
                    "token_name": "Text Token",
                    "token_value": "BXx13.K6Jp6@IpbVqlL4N.h9vJ1.akT2Q",
                    "value": "Rahul.kumar@singlecrm.nokia.com"
                }
            ],
            "error_msg": null,
            "submitted_time": "2024-09-26 15:12:38",
            "completed_time": "2024-09-26 15:12:40",
            "status": "SUCCESS"
        }
    ],
    "success": true,
    "error": {
        "message": ""
    }
}

 

Result structure for status“IN-PROGRESS”: #

If the status is IN_PROGRESS, try again after a few minutes to see if the data has been processed.

{
  "data": [
    {
      "tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
      "call_type": "unmask",
      "input_payload": {
        "unmask": [
          {
            "token_value": "n3dVs6D0Ni"
          },
          {
            "token_value": "<PER>n3dVs6D0Ni</PER>"
          },
          {
            "token_value": "<PER>n3dVs6D0Ni</PER> lives in the <ADDRESS>8SNwyGwcY2.YcLTWWIXHF.iLgmVciGq1</ADDRESS>"
          }
        ]
      },
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:37:21",
      "completed_time":"None",
      "status":"IN-PROGRESS"
    },
    {
      "tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
      "call_type": "mask",
      "input_payload": {
        "mask": [
          {
            "value": "He lives in the U.S.A"
          },
          {
            "value": "George Washington visited China."
          }
        ]
      },
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:21:53",
      "completed_time":"None",
      "status":"IN-PROGRESS"
    }
  ],
  "success": true,
  "error": {
    "message": ""
  }
}

Result structure for status “PENDING”: #

{
  "data": [
    {
      "tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
      "call_type": "unmask",
      "input_payload": {
        "unmask": [
          {
            "token_value": "n3dVs6D0Ni"
          },
          {
            "token_value": "<PER>n3dVs6D0Ni</PER>"
          },
          {
            "token_value": "<PER>n3dVs6D0Ni</PER> lives in the <ADDRESS>8SNwyGwcY2.YcLTWWIXHF.iLgmVciGq1</ADDRESS>"
          }
        ]
      },
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:37:21",
      "completed_time":"None",
      "status":"PENDING"
    },
    {
      "tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
      "call_type": "mask",
      "input_payload": {
        "mask": [
          {
            "value": "He lives in the U.S.A"
          },
          {
            "value": "George Washington visited China."
          }
        ]
      },
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:21:53",
      "completed_time":"None",
      "status":"PENDING"
    }
  ],
  "success": true,
  "error": {
    "message": ""
  }
}

Result structure for status “FAILED”: #

{ "data": [
    {
      "tracking_id": "43318680-9515-432c-a152-1b9b9ebc1ba629042024114022",
      "call_type": "unmask",
      "input_payload": {
        "unmask": []
      },
      "result": null,
      "error_msg": "Processing Async request failed for tracker_id:43318680-9515-432c-a152-1b9b9ebc1ba629042024114022 with error: Payload is empty",
      "submitted_time": "2024-04-29 11:40:22",
      "completed_time": "2024-04-29 11:40:23",
      "status": "FAILED"
    },
    {
      "tracking_id": "aff361c8-50da-4680-9b07-9d1c1b1b004229042024113917",
      "call_type": "mask",
      "input_payload": {
        "mask": [
          {
            "": "He lives in the U.S.A"
          },
          {
            "value": "George Washington visited China."
          }
        ]
      },
      "result": null,
      "error_msg": "Processing Async request failed for tracker_id:aff361c8-50da-4680-9b07-9d1c1b1b004229042024113917 with error: Missing value",
      "submitted_time": "2024-04-29 11:39:17",
      "completed_time": "2024-04-29 11:39:23",
      "status": "FAILED"
    }
  ],
  "success": true,
  "error": {
    "message": ""
  }
}
Result structure for status “PURGED”:
{
  "data": [
    {
      "tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
      "call_type": "unmask",
      "input_payload":"None",
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:37:21",
      "completed_time": "2024-04-29 08:37:23",
      "status": "PURGED"
    },
    {
      "tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
      "call_type": "mask",
      "input_payload":"None",
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:21:53",
      "completed_time": "2024-04-29 08:22:05",
      "status": "PURGED"
    }
  ],
  "success": true,
  "error": {
    "message": ""
  }
}

Result structure for status “PURGED”: #

{
  "data": [
    {
      "tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
      "call_type": "unmask",
      "input_payload":"None",
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:37:21",
      "completed_time": "2024-04-29 08:37:23",
      "status": "PURGED"
    },
    {
      "tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
      "call_type": "mask",
      "input_payload":"None",
      "result":"None",
      "error_msg":"None",
      "submitted_time": "2024-04-29 08:21:53",
      "completed_time": "2024-04-29 08:22:05",
      "status": "PURGED"
    }
  ],
  "success": true,
  "error": {
    "message": ""
  }
}

For more comprehensive information about our product, kindly reach out to us through our website at https://www.protecto.ai/.

What are your feelings

© All Rights Reserved 2023 | Protecto

Scroll to Top