# Multi Get API - POST equivalent?

**URL:** <https://discuss.elastic.co/t/multi-get-api-post-equivalent/150687>\
**Category:** Elasticsearch\
**Created:** [October 2, 2018, 11:32am UTC](https://discuss.elastic.co/t/multi-get-api-post-equivalent/150687 "2018-10-02T11:32:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Jones](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@Ryan\_Jones](https://discuss.elastic.co/u/Ryan_Jones)\
**Post date:** [October 2, 2018, 11:32am UTC](https://discuss.elastic.co/t/multi-get-api-post-equivalent/150687/1 "2018-10-02T11:32:50Z")

</div>

Hi,

I want to use the Multi Get API, but can see that it uses the GET HTTP verb, yet takes in a body.

Is there a POST equivalent to this API?

I'm writing a Java-based application and using either a Jersey Client or UniRest to call the Elastic Search API.  
Using these 2 libraries, I am unable to pass through a body to a GET.

Thanks,  
Ryan

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [October 2, 2018, 11:37am UTC](https://discuss.elastic.co/t/multi-get-api-post-equivalent/150687/2 "2018-10-02T11:37:37Z")

</div>

Yes, the multi get API also accepts POST instead of GET as can be seen in [`RestMultiGetAction.java`](https://github.com/elastic/elasticsearch/blob/237650e9c054149fd08213b38a81a3666c1868e5/server/src/main/java/org/elasticsearch/rest/action/document/RestMultiGetAction.java#L44-L49):

```
public RestMultiGetAction(Settings settings, RestController controller) {
    super(settings);
    controller.registerHandler(GET, "/_mget", this);
    controller.registerHandler(POST, "/_mget", this);
    controller.registerHandler(GET, "/{index}/_mget", this);
    controller.registerHandler(POST, "/{index}/_mget", this);
    controller.registerHandler(GET, "/{index}/{type}/_mget", this);
    controller.registerHandler(POST, "/{index}/{type}/_mget", this);

    this.allowExplicitIndex = MULTI_ALLOW_EXPLICIT_INDEX.get(settings);
}
```

---

<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 30, 2018, 11:37am UTC](https://discuss.elastic.co/t/multi-get-api-post-equivalent/150687/3 "2018-10-30T11:37:48Z")

</div>

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