# Elasticsearch index response in logstash

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285>\
**Category:** Logstash\
**Created:** [July 24, 2018, 3:53am UTC](https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285 "2018-07-24T03:53:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hambrise\_luke\_alan\_j](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hambrise\_luke\_alan\_j](https://discuss.elastic.co/u/hambrise_luke_alan_j)\
**Post date:** [July 24, 2018, 3:53am UTC](https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285/1 "2018-07-24T03:53:04Z")

</div>

Hi, I am trying to index data to elasticsearch through logstash. I want to get the output like how we get the result using curl commands or apis(like below).

{  
"\_index": "testindex",  
"\_type": "\_doc",  
"\_id": "1",  
"\_version": 1,  
"result": "created",  
"\_shards": {  
"total": 2,  
"successful": 1,  
"failed": 0  
},  
"\_seq\_no": 0,  
"\_primary\_term": 1  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 25, 2018, 8:16pm UTC](https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285/2 "2018-07-25T20:16:12Z")

</div>

I don't understand. You want to index the response you get from REST APIs?

---

<div class="post-metadata">

**Author:** ![michaelm14](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@michaelm14](https://discuss.elastic.co/u/michaelm14)\
**Post date:** [July 25, 2018, 10:38pm UTC](https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285/3 "2018-07-25T22:38:25Z")

</div>

I believe he is asking for a "successful/failed" response from LS, like you'd get from the API. I don't believe its natively possible in LS, though. There's no feedback beyond the LS logs and that's not the same.

---

<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:** [August 22, 2018, 10:38pm UTC](https://discuss.elastic.co/t/elasticsearch-index-response-in-logstash/141285/4 "2018-08-22T22:38:31Z")

</div>

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