# Http poller output

**URL:** https://discuss.elastic.co/t/http-poller-output/211166
**Category:** Logstash
**Created:** [December 9, 2019, 5:24pm UTC](https://discuss.elastic.co/t/http-poller-output/211166 "2019-12-09T17:24:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![raged](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raged/32/45722_2.png) [@raged](https://discuss.elastic.co/u/raged)
#### Post date: [December 9, 2019, 5:24pm UTC](https://discuss.elastic.co/t/http-poller-output/211166/1 "2019-12-09T17:24:17Z")

</div>

I have an API that returns several objects. Currently the output is getting each item and sending it individually.

Is there a way to send the entire JSON from the initial http poller?

I am trying to utilize the http poller to fetch data from a rest call, then in logstash I am referencing it by using a elasticsearch filter (seems janky the way I am doing this...) would an http filter better suite this? Only reason I didn't go down that route yet is because I don't know if the http filter attempts to call the rest api on each event, or if it's cached for a certain period of time.

Thanks,  
Raged.

---

<div class="post-metadata">

### Author: ![raged](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raged/32/45722_2.png) [@raged](https://discuss.elastic.co/u/raged)
#### Post date: [December 10, 2019, 1:34pm UTC](https://discuss.elastic.co/t/http-poller-output/211166/2 "2019-12-10T13:34:34Z")

</div>

I was able to modify the API call to get the data returned as an object by appending:

`_return_as_object=1`

---

<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 7, 2020, 1:34pm UTC](https://discuss.elastic.co/t/http-poller-output/211166/3 "2020-01-07T13:34:49Z")

</div>

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