# GetMappings API using Java High Level Rest Client not working

**URL:** <https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336>\
**Category:** Elasticsearch\
**Created:** [September 5, 2018, 8:18am UTC](https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336 "2018-09-05T08:18:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimalk](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@rimalk](https://discuss.elastic.co/u/rimalk)\
**Post date:** [September 5, 2018, 8:18am UTC](https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336/1 "2018-09-05T08:18:06Z")

</div>

Hi,

I am not able to execute the GetMappings request using the Java High Level Rest Client.

I am getting an error  
Exception in thread "main" ElasticsearchStatusException[Elasticsearch exception [type=illegal\_argument\_exception, reason=request [my-index/\_mapping] contains unrecognized parameter: [master\_timeout]]]

```
GetMappingsRequest request = new GetMappingsRequest();
request.indices("my-index");

GetMappingsResponse getMappingsResponse = esClient.indices().getMapping(request, RequestOptions.DEFAULT);

```

I am using Amazon Elasticsearch v6 . My es java rest client version is 6.4.0

---

<div class="post-metadata">

**Author:** ![Stefan\_Grell](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Stefan\_Grell](https://discuss.elastic.co/u/Stefan_Grell)\
**Post date:** [September 20, 2018, 10:31am UTC](https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336/2 "2018-09-20T10:31:27Z")

</div>

Hi Rimal,

Is the Elastic Version of the Amazon Instance also a 6.4.0?  
I had this Exception thrown when I accidentally started my Application with a ES 6.2.4 Node. The GetMappingsRequest works fine with 6.4.0.

---

<div class="post-metadata">

**Author:** ![rimalk](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@rimalk](https://discuss.elastic.co/u/rimalk)\
**Post date:** [September 20, 2018, 11:53am UTC](https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336/3 "2018-09-20T11:53:07Z")

</div>

No. The amazon es version is 6.3

But with elasticsearch-rest-high-level-client 6.3 version, I cannot find a way to execute a get mapping request.

Found a put mapping request here: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-put-mapping.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-put-mapping.html)

But could not find how to execute a get mapping request .

---

<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:** [October 18, 2018, 11:53am UTC](https://discuss.elastic.co/t/getmappings-api-using-java-high-level-rest-client-not-working/147336/4 "2018-10-18T11:53:09Z")

</div>

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