# No delete task by id API in ES cluster? Intentionally? Not documented?

**URL:** <https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412>\
**Category:** Elasticsearch\
**Created:** [June 14, 2017, 3:34pm UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412 "2017-06-14T15:34:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yandooo](https://avatars.discourse-cdn.com/v4/letter/y/67e7ee/32.png) [@yandooo](https://discuss.elastic.co/u/yandooo)\
**Post date:** [June 14, 2017, 3:34pm UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/1 "2017-06-14T15:34:47Z")

</div>

Documentation doesn't say anything about how to delete task by id [https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2017, 1:18am UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/2 "2017-06-15T01:18:50Z")

</div>

You need to cancel it - [https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#task-cancellation](https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#task-cancellation)

---

<div class="post-metadata">

**Author:** ![yandooo](https://avatars.discourse-cdn.com/v4/letter/y/67e7ee/32.png) [@yandooo](https://discuss.elastic.co/u/yandooo)\
**Post date:** [June 15, 2017, 8:24am UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/3 "2017-06-15T08:24:09Z")

</div>

so is it possible to cancel (delete) finished task?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2017, 10:52pm UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/4 "2017-06-15T22:52:33Z")

</div>

No it is not.

---

<div class="post-metadata">

**Author:** ![trik-1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trik-1/32/23966_2.png) [@trik-1](https://discuss.elastic.co/u/trik-1)\
**Post date:** [June 19, 2017, 12:15pm UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/5 "2017-06-19T12:15:41Z")

</div>

Hope I'm not missing something obvious here but how do you delete the task document once the task has completed as per the documentation for the delete by query api ?

> The cost of this feature is the document that wait\_for\_completion=false creates at .tasks/task/${taskId}. It is up to you to delete that document.

> **[Delete by query API | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html)**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 17, 2017, 12:15pm UTC](https://discuss.elastic.co/t/no-delete-task-by-id-api-in-es-cluster-intentionally-not-documented/89412/6 "2017-07-17T12:15:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
