mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-03-09 14:38:01 +00:00
* Refactor ML section - local and remote models Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added command to calculate checksum Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add ONNX format to register API Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add sparse encoding predict example Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add API section Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Refactor the API section Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Typo Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Implemented Vale comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add get connector API Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Reword heading Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Addressed tech review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
45 lines
885 B
Markdown
45 lines
885 B
Markdown
---
|
|
layout: default
|
|
title: Delete task
|
|
parent: Tasks APIs
|
|
grand_parent: ML Commons API
|
|
nav_order: 20
|
|
---
|
|
|
|
# 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.
|
|
{: .note}
|
|
|
|
### Path and HTTP methods
|
|
|
|
```json
|
|
DELETE /_plugins/_ml/tasks/<task_id>
|
|
```
|
|
|
|
#### Example request
|
|
|
|
```json
|
|
DELETE /_plugins/_ml/tasks/xQRYLX8BydmmU1x6nuD3
|
|
```
|
|
{% include copy-curl.html %}
|
|
|
|
#### Example response
|
|
|
|
```json
|
|
{
|
|
"_index" : ".plugins-ml-task",
|
|
"_id" : "xQRYLX8BydmmU1x6nuD3",
|
|
"_version" : 4,
|
|
"result" : "deleted",
|
|
"_shards" : {
|
|
"total" : 2,
|
|
"successful" : 2,
|
|
"failed" : 0
|
|
},
|
|
"_seq_no" : 42,
|
|
"_primary_term" : 7
|
|
}
|
|
``` |