Async Status Lifecycle
Understand the lifecycle of Protecto async jobs — from PENDING through SUCCESS, FAILED, or PURGED.
Status flow
Status reference
| Status | Meaning | What you should do |
|---|---|---|
PENDING | Job accepted, not yet started | Poll again in 30–60 seconds |
IN-PROGRESS | Processing is active | Poll again in 30–60 seconds |
SUCCESS | Completed successfully | Read result from the status response and store it |
FAILED | Completed with an error | Read error_msg, fix the input, and resubmit as a new job |
PURGED | Job data has expired | Results 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
resultand 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.
Was this page helpful?
Last updated 3 weeks ago
Built with Documentation.AI