Get Task Information
Endpoint Description
GET /clore/v1/tasks/{task_id}
Retrieves information about a specific task, identified by its unique task ID. This endpoint is useful for monitoring the progress, status, and outcome of asynchronous operations initiated within the platform.
Path Parameters
- task_id (required): The unique identifier of the task whose information is being requested.
Success Response
Status Code: 200 OK
The response body contains detailed information about the task, including its current status and, if applicable, the reason for failure.
Fields
- task_id: The unique identifier of the task.
- status: The current status of the task, which can be
pending
,in_progress
,success
, orfailed
. - fail_reason: A descriptive message explaining why the task failed. This field is only present if the task status is
failed
.
Example Response Body
{
"task_id": "unique_task_identifier",
"status": "success",
"fail_reason": null
}
Error Responses
- 400 Bad Request: Returned if the
task_id
provided in the path is not in a valid format.- Example:
{"error": "Invalid task_id format"}
- Example:
- 404 Not Found: Returned if no task matching the provided
task_id
could be found.- Example:
{"error": "Task not found"}
- Example:
Notes
- Tasks represent asynchronous operations. The status of a task may change over time, so it is advisable to poll this endpoint periodically until the task reaches a terminal state (
success
orfailed
). - In case of a
failed
status, thefail_reason
provides insight into what went wrong, assisting in troubleshooting and corrective actions.
Example cURL Request
curl -X GET "https://api.hiveon.ai/clore/v1/tasks/{task_id}" \
-H "Accept: application/json"
Replace {task_id}
with the actual task ID you wish to inquire about.