Use Tasks APIs to get a list of tasks for long-running operations or the status of a specific task.
Overview of endpoints and methods
The Tasks API has these endpoints and methods:
Method | Use |
---|---|
All tasks |
|
|
Get a list of tasks for long-running operations, such as creating or deleting clusters. Optionally, you can use a query string to limit the size of the list by the number of tasks ( |
A specific task |
|
|
Get the status of a specific task for a long-running operation, such as creating or deleting a cluster. |
To obtain HTTP request URIs, prepend https://pg01.us-west1.cloud.lucidworks.com/managed/api/
to the endpoints shown. For example, the HTTP request URI for the endpoint customers/customerId/tasks/
is https://pg01.us-west1.cloud.lucidworks.com/managed/api/customers/customerId/tasks/
.
Task statuses
Tasks and subtasks can have these statuses, which are keys in the JSON object in the response. The corresponding values are the number of subtasks with each status (for all statuses except failed
) or the failure reasons (for the status failed
).
Status | Details |
---|---|
|
The total number of subtasks. |
|
The task or subtask succeeded. |
|
The task or subtask is still running. |
|
The task or one or more subtasks failed. The value gives the failure reason. After correcting the failure reason, retry the failed task. |
This is an example JSON object from a response in which one of five subtasks failed:
{
"total" : 5,
"success" : 2,
"running" : 2,
"failed" : [
"failed to create the monitoring dashboard"
],
}