Updated on January 4, 2024

Get status of Async method

The asynchronous status method enables us to monitor the status of both masking and unmasking processes.

This approach enables you to track the status of the asynchronous request you’ve submitted. The possible statuses include “PENDING,” “SUCCESS,” “FAILED,” and “PURGED.” If the request attains a “SUCCESS” status, the outcome will encompass the mask/unmask response. Any successful mask/unmask requests undergo automatic purging after one hour.

Note: To obtain the <auth token>, please refer to the Step-by-Step Guide to Obtain Your Auth Token.

Code Snippet

# pass the tracking id as a list to the async method
payload = ["9f178448-fe87-44c1-b2b3-80d6277ca6b028122023141605","5fb1f730-9fa2-4dbc-90ae-d839ef5d725e02012024045532"]
status = obj.async_status(payload)
print(status)

Result:

{
   "data":[
      {
         "tracking_id":"5fb1f730-9fa2-4dbc-90ae-d839ef5d725e02012024045532",
         "call_type":"unmask",
         "input_payload":{
            "unmask":[
               {
                  "token_value":"mTiygJz7Tf"
               },
               {
                  "token_value":"<PER>mTiygJz7Tf</PER> lives in the <ADDRESS>oQLxg3gisk.G2jPUYZHcv.bHIrJ0Mb7k</ADDRESS>"
               },
               {
                  "token_value":"<PER>9g5Rfz77xv</PER> lives in the <ADDRESS>vzincci4VX.wPMAp7N015.EX52Xgft5m</ADDRESS>"
               }
            ]
         },
         "result":[
            {
               "token_value":"mTiygJz7Tf",
               "value":"mTiygJz7Tf"
            },
            {
               "token_value":"<PER>mTiygJz7Tf</PER> lives in the <ADDRESS>oQLxg3gisk.G2jPUYZHcv.bHIrJ0Mb7k</ADDRESS>",
               "value":"mTiygJz7Tf lives in the oQLxg3gisk.G2jPUYZHcv.bHIrJ0Mb7k"
            },
            {
               "token_value":"<PER>9g5Rfz77xv</PER> lives in the <ADDRESS>vzincci4VX.wPMAp7N015.EX52Xgft5m</ADDRESS>",
               "value":"Ram lives in the U.S.A"
            }
         ],
         "error_msg":"None",
         "submitted_time":"2024-01-02 04:55:32",
         "completed_time":"2024-01-02 04:55:34",
         "status":"SUCCESS"
      },
      {
         "tracking_id":"9f178448-fe87-44c1-b2b3-80d6277ca6b028122023141605",
         "call_type":"mask",
         "input_payload":"None",
         "result":"None",
         "error_msg":"None",
         "submitted_time":"2023-12-28 14:16:05",
         "completed_time":"2023-12-28 14:16:13",
         "status":"PURGED"
      }
   ],
   "success":true,
   "error":{
      "message":""
   }
}

 

What are your feelings
Scroll to Top