Ninja API
Get task result
Retrieve the current status and result of a Ninja task.
GET
Retrieves the current status and result of a task. Supports long-polling when the task is
in_progress.
Request parameters
UUID of the task returned from the create endpoint.
Set to
1 to enable long-polling. When the task is in_progress, the request blocks until the task completes or the request times out. For tasks in any other status (pending, completed,
failed, etc), this parameter has no effect and the request returns immediately.| Value | Description |
|---|---|
0 | Return immediately with the current status. (default) |
1 | Long-poll until the task completes (only when in_progress). |
Response fields
UUID of the task.
Current task status. One of:
pending, in_progress, completed, failed, cancelled, paused, stopped, impossible, out_of_credits. See task statuses.The task result. Present when
status is completed. If a resultSchema was provided at creation, this is a JSON object conforming to that schema; otherwise it is a plain text string. null for
all other statuses.Error message when
status is failed. null for all other statuses.