# Getting task details from the RestHighLevelClient

**URL:** https://discuss.elastic.co/t/getting-task-details-from-the-resthighlevelclient/202543
**Category:** Elasticsearch
**Created:** [October 7, 2019, 1:36pm UTC](https://discuss.elastic.co/t/getting-task-details-from-the-resthighlevelclient/202543 "2019-10-07T13:36:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Tristan\_Larouanne](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tristan_larouanne/32/55489_2.png) [@Tristan\_Larouanne](https://discuss.elastic.co/u/Tristan_Larouanne)
#### Post date: [October 7, 2019, 1:36pm UTC](https://discuss.elastic.co/t/getting-task-details-from-the-resthighlevelclient/202543/1 "2019-10-07T13:36:14Z")

</div>

Context:  
I want to reindex a (remote) index, with the JAVA client (RestHighLevelClient, right ?) using the client version 7.2.1 (but I can probably upgrade if needed).  
Also, I want to use a wait\_for\_completion=false to not keep the http call during the index.

Following the documentation:

- [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-document-reindex.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-document-reindex.html) --\> I got a taskId.
- I assume that I should not use a transport client, as this will be deprecated
- [https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-update-by-query.html#java-docs-update-by-query-task-api](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-update-by-query.html#java-docs-update-by-query-task-api) explain how to use the taskAPI, and ..
- [https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-admin.html) how to get an 'admin' client.

However, I don't have the method "admin" on my [RestHighLevelClient](https://github.com/elastic/elasticsearch/blob/master/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java)

Question:

1. Can I achieve an aynchronious reindex operation and have the status of this task with the Java RestHighLevelClient
2. If not, did you have any other alternative. I don't really want to rely on curl/httpget stuff ideally.

---

<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: [November 4, 2019, 1:36pm UTC](https://discuss.elastic.co/t/getting-task-details-from-the-resthighlevelclient/202543/2 "2019-11-04T13:36:28Z")

</div>

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