Delete a task

Deletes a task based on the task_id.

ML Commons does not check the task status when running the delete request. There is a risk that a currently running task could be deleted before the task completes. To check the status of a task, run GET /_plugins/_ml/tasks/<task_id> before task deletion.

Path and HTTP methods

  1. DELETE /_plugins/_ml/tasks/<task_id>

Example request

  1. DELETE /_plugins/_ml/tasks/xQRYLX8BydmmU1x6nuD3

copy

Example response

  1. {
  2. "_index" : ".plugins-ml-task",
  3. "_id" : "xQRYLX8BydmmU1x6nuD3",
  4. "_version" : 4,
  5. "result" : "deleted",
  6. "_shards" : {
  7. "total" : 2,
  8. "successful" : 2,
  9. "failed" : 0
  10. },
  11. "_seq_no" : 42,
  12. "_primary_term" : 7
  13. }