# Java RestHighLevelClient missing get single task

**URL:** https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [September 2, 2020, 2:07pm UTC](https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243 "2020-09-02T14:07:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Leynch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leynch/32/74969_2.png) [@Leynch](https://discuss.elastic.co/u/Leynch)
#### Post date: [September 2, 2020, 2:07pm UTC](https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243/1 "2020-09-02T14:07:11Z")

</div>

Which is the preferred way to get a single running task by ID?  
I'm looking at these two documentations (v7.9) for using Tasks:  
[REST API](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/tasks.html)  
[Java Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.9/java-rest-high-tasks-list.html)  
but i can't find a way to get a single Task through the Java client. Should i use the `LowLevelClient` on the task API (`GET /_tasks/<task_id>`) or is it better to use the `HighLevelClient` on the task index `.index`? But the index seems to contain only the completed tasks and not the running ones.

---

<div class="post-metadata">

### Author: ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)
#### Post date: [September 2, 2020, 2:18pm UTC](https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243/2 "2020-09-02T14:18:58Z")

</div>

Can you check this [link](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-tasks-list.html)

---

<div class="post-metadata">

### Author: ![Leynch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leynch/32/74969_2.png) [@Leynch](https://discuss.elastic.co/u/Leynch)
#### Post date: [September 2, 2020, 2:27pm UTC](https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243/3 "2020-09-02T14:27:15Z")

</div>

I can't see anything new?! There is no option to specify a single task ID. Or what do you mean?

---

<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: [September 30, 2020, 2:27pm UTC](https://discuss.elastic.co/t/java-resthighlevelclient-missing-get-single-task/247243/4 "2020-09-30T14:27:18Z")

</div>

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