# Http\_poller and dynamic time variable

**URL:** https://discuss.elastic.co/t/http-poller-and-dynamic-time-variable/177663
**Category:** Logstash
**Created:** [April 19, 2019, 7:20pm UTC](https://discuss.elastic.co/t/http-poller-and-dynamic-time-variable/177663 "2019-04-19T19:20:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lgwapnitsky](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lgwapnitsky/32/42919_2.png) [@lgwapnitsky](https://discuss.elastic.co/u/lgwapnitsky)
#### Post date: [April 19, 2019, 7:20pm UTC](https://discuss.elastic.co/t/http-poller-and-dynamic-time-variable/177663/1 "2019-04-19T19:20:10Z")

</div>

I have need to pull from an API where the time variables (start and end) need to be specified for a specific range in UTC format.

What is the proper way to pull these from the system, as they are not environmental variables? Is it possible to embed a ruby script into the poller section so that these variables can be generated?

Example of the api call:

`https://api.cloudflare.com/client/v4/zones/SITEKEY/logs/received?start=2019-04-18T13:30:00Z&end=2019-04-18T13:35:00Z`

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 19, 2019, 7:47pm UTC](https://discuss.elastic.co/t/http-poller-and-dynamic-time-variable/177663/2 "2019-04-19T19:47:25Z")

</div>

You cannot do that with an http\_poller _input_. However, you could use http\_poller just for its scheduler (or exec, or something else that has a scheduler option), then use an http _filter_ to make the 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: [May 17, 2019, 7:47pm UTC](https://discuss.elastic.co/t/http-poller-and-dynamic-time-variable/177663/3 "2019-05-17T19:47:27Z")

</div>

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