Async APIsStatus Lifecycle

Async Status Lifecycle

Understand the lifecycle of Protecto async jobs — from PENDING through SUCCESS, FAILED, or PURGED.

Status flow

Status reference

StatusMeaningWhat you should do
PENDINGJob accepted, not yet startedPoll again in 30–60 seconds
IN-PROGRESSProcessing is activePoll again in 30–60 seconds
SUCCESSCompleted successfullyRead result from the status response and store it
FAILEDCompleted with an errorRead error_msg, fix the input, and resubmit as a new job
PURGEDJob data has expiredResults are gone — re-run the job if needed

SUCCESS, FAILED, and PURGED are terminal states. Stop polling once you reach one of these.

Practical guidance

Submit the async job

Call Mask Async or Unmask Async. Store the tracking_id from the response.

Poll until terminal

Call Async Status every 30–60 seconds. Continue until status is SUCCESS, FAILED, or PURGED.

Handle the terminal state

  • SUCCESS: Read result and store the output in your system immediately
  • FAILED: Read error_msg, fix the input payload, and submit a new job
  • PURGED: Results are no longer available — re-submit the job if results are still needed

Store results on your side when the job reaches SUCCESS. Job data will eventually be purged and cannot be recovered after that point.

Polling interval recommendation

Poll every 30 to 60 seconds. More frequent polling is unnecessary for batch workloads and increases API load without benefit.