Retrieve an async task
Returns the current status of a background task. The task_id is the one returned by whichever operation started the work, such as deleting a batch. A task that records no project in its args returns 403 to every token.
On a batch delete, args, result and error_message are returned only to the person who started the delete and to account admins. Anyone else polling the task, including a token with no person behind it, gets the response without those keys. Requires the read:project token scope.
Authorizations
Path Parameters
The task's friendly ID (e.g. task_AbCd1234567890Ef), or the id that POST /ledgers/{ledger_id}/batch_generations returns.
Response
Async task status
Friendly async task ID.
"task_AbCd1234567890Ef"
Opaque identifier for the kind of background work, e.g. ProductionAccounting::BatchBulkDestroyTask. New kinds may appear.
"ProductionAccounting::BatchBulkDestroyTask"
For Reporting::ReportInitiation specifically, a failure classified onto the resulting registry submission (see GET /reports/{report_id}'s registry_submissions) completes the task normally rather than failing it. Check the submission's kind/reason/sent, not this task's state, for that task type.
initialized, running, completed, failed 0 <= x <= 100Set when state is failed. Omitted when redacted for the caller.
Omitted when redacted for the caller.
Omitted when redacted for the caller.