# When does a task's stored result removed?

**URL:** <https://discuss.elastic.co/t/when-does-a-tasks-stored-result-removed/94322>\
**Category:** Elasticsearch\
**Created:** [July 24, 2017, 11:59am UTC](https://discuss.elastic.co/t/when-does-a-tasks-stored-result-removed/94322 "2017-07-24T11:59:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adavidai](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@adavidai](https://discuss.elastic.co/u/adavidai)\
**Post date:** [July 24, 2017, 11:59am UTC](https://discuss.elastic.co/t/when-does-a-tasks-stored-result-removed/94322/1 "2017-07-24T11:59:08Z")

</div>

Hi 🙂

I am using the [tasks management api](https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html) to asynchronously get the result of a reindex action. I was wondering, when will the task result be deleted? When is the task status deleted (and I'll get 404 when trying to get it by id)?  
I am using Elasticsearch 5.3.2.

---

<div class="post-metadata">

**Author:** ![adavidai](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@adavidai](https://discuss.elastic.co/u/adavidai)\
**Post date:** [July 30, 2017, 4:46am UTC](https://discuss.elastic.co/t/when-does-a-tasks-stored-result-removed/94322/2 "2017-07-30T04:46:48Z")

</div>

To answer my own question (RTFM), from the [reindex API doc](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-task-api) (I was expecting it on the tasks API doc for some reason):

> 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**.

---

<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:** [August 27, 2017, 4:47am UTC](https://discuss.elastic.co/t/when-does-a-tasks-stored-result-removed/94322/3 "2017-08-27T04:47:11Z")

</div>

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