opensearch-docs-cn/_ml-commons-plugin/api/tasks-apis/get-task.md

742 B

layout title parent grand_parent nav_order
default Get task Tasks APIs ML Commons APIs 10

Get task

You can retrieve information about a task using the task_id.

Path and HTTP methods

GET /_plugins/_ml/tasks/<task_id>

Example request

GET /_plugins/_ml/tasks/MsBi1YsB0jLkkocYjD5f

{% include copy-curl.html %}

Example response

The response includes information about the task.

{
  "model_id" : "l7lamX8BO5w8y8Ra2oty",
  "task_type" : "TRAINING",
  "function_name" : "KMEANS",
  "state" : "COMPLETED",
  "input_type" : "SEARCH_QUERY",
  "worker_node" : "54xOe0w8Qjyze00UuLDfdA",
  "create_time" : 1647545342556,
  "last_update_time" : 1647545342587,
  "is_async" : true
}