# Use es client to call ingest simulate

**URL:** <https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733>\
**Category:** Kibana\
**Created:** [December 22, 2016, 5:04am UTC](https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733 "2016-12-22T05:04:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ginger](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@ginger](https://discuss.elastic.co/u/ginger)\
**Post date:** [December 22, 2016, 5:04am UTC](https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733/1 "2016-12-22T05:04:23Z")

</div>

Hi.

I am use es client to communicate with elasticsearch.  
All other interfaces works except es.ingest.simulate. My code is as follows:

> ```
> es.get({
> index: "website",
> type: "blog",
> id: "123"
> })
> .then(function (obj) {
> notify.error('jgq check get!');
> })
> .catch(notify.fatal);
> 
> ```

> ```
> var param = {
> body: {
> "pipeline" :
> {
> "description": "_description",
> "processors": [
> {
> "set" : {
> "field" : "field2",
> "value" : "_value"
> }
> }
> ]
> },
> "docs": [
> {
> "_index": "index",
> "_type": "type",
> "_id": "id",
> "_source": {
> "foo": "bar"
> }
> }
> ]
> }
> };
> 
> ```

> ```
> es.ingest.simulate(param)
> .then(function(response) {
> notify.error('jgq check simulate!');
> })
> .catch((err) => {
> notify.error('jgq check simulate fail!');
> });
> 
> ```

The get interface succeed while the ingest.simulate failed, and the error I get is:

> [http://192.168.214.131:5601/zhn/elasticsearch/\_ingest/pipeline/\_simulate](http://192.168.214.131:5601/zhn/elasticsearch/_ingest/pipeline/_simulate) 404 (Not Found)

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [December 22, 2016, 4:13pm UTC](https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733/2 "2016-12-22T16:13:44Z")

</div>

Currently there is not an ES proxy created for the ingest pipeline. You can see the proxy setup [here](https://github.com/elastic/kibana/blob/master/src/core_plugins/elasticsearch/index.js#L54-L59).

---

<div class="post-metadata">

**Author:** ![ginger](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@ginger](https://discuss.elastic.co/u/ginger)\
**Post date:** [December 23, 2016, 1:02am UTC](https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733/3 "2016-12-23T01:02:29Z")

</div>

Thanks!

---

<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:** [January 20, 2017, 1:02am UTC](https://discuss.elastic.co/t/use-es-client-to-call-ingest-simulate/69733/4 "2017-01-20T01:02:40Z")

</div>

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