# Update to rest client instead of transport client

**URL:** <https://discuss.elastic.co/t/update-to-rest-client-instead-of-transport-client/127023>\
**Category:** Elasticsearch\
**Created:** [April 6, 2018, 5:46am UTC](https://discuss.elastic.co/t/update-to-rest-client-instead-of-transport-client/127023 "2018-04-06T05:46:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ts\_rana](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@ts\_rana](https://discuss.elastic.co/u/ts_rana)\
**Post date:** [April 6, 2018, 5:46am UTC](https://discuss.elastic.co/t/update-to-rest-client-instead-of-transport-client/127023/1 "2018-04-06T05:46:20Z")

</div>

Could you please help me to find corresponding API references for update these API to rest or any example ?  
1.String[] indices = transportClient.admin().indices().prepareGetIndex().addIndices("_\_" + tid + "-_").execute().actionGet().getIndices();  
2.transportClient.admin().indices().prepareFlush(indexName).get();  
3. transportClient.admin().indices().prepareRefresh(indexName).get();  
4.transportClient .admin().cluster().state(clusterStateRequest)  
.actionGet().getState().getMetaData()  
.index(indexName).getAliases();  
5.IndexRequestBuilder indexRequest = transportClient.prepareIndex(indexName, "tested", String.valueOf(id)).setSource(node.toString(), XContentType.JSON);

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2018, 7:14am UTC](https://discuss.elastic.co/t/update-to-rest-client-instead-of-transport-client/127023/2 "2018-04-06T07:14:39Z")

</div>

Have a look at

> <https://github.com/elastic/elasticsearch/issues/27205>

Some of the APIs you mentioned will be available in the next major version 6.3.0.

In the meantime you can either try a SNAPSHOT version or use the low level client to implement that by yourself.

---

<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:** [May 4, 2018, 7:14am UTC](https://discuss.elastic.co/t/update-to-rest-client-instead-of-transport-client/127023/3 "2018-05-04T07:14:48Z")

</div>

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