# Logstash: http\_poller: first URL request's response should be input to second URL's request param

**URL:** https://discuss.elastic.co/t/logstash-http-poller-first-url-requests-response-should-be-input-to-second-urls-request-param/51057
**Category:** Logstash
**Created:** [May 26, 2016, 12:08pm UTC](https://discuss.elastic.co/t/logstash-http-poller-first-url-requests-response-should-be-input-to-second-urls-request-param/51057 "2016-05-26T12:08:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![amitvi](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@amitvi](https://discuss.elastic.co/u/amitvi)
#### Post date: [May 26, 2016, 12:08pm UTC](https://discuss.elastic.co/t/logstash-http-poller-first-url-requests-response-should-be-input-to-second-urls-request-param/51057/1 "2016-05-26T12:08:13Z")

</div>

I have two URLs (due to security concern i will explain by using dummy)

a\> [https://xyz.company.com/ui/api/token](https://xyz.company.com/ui/api/token)  
b\> [https://xyz.company.com/request/transaction?date=2016-01-21&token=](https://xyz.company.com/request/transaction?date=2016-01-21&token=)

When you hit url mentioned in point 'a' it will generate a token let it be a string of 16 characters

Then that token should be used in making second request of point 'b' in token param

The second url response is important to me i.e is a JSON response, I need  
to filter the json data and extract required data and output it to standard  
output and elastic search.

is there any way of doing so in logstash using plugin "http\_poller" or any other plugins.

Note : these request urls should be executed one after another, i.e point 'a' url should be executed first and point 'b' url should be executed next after receiving new token.

Please suggest.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 26, 2016, 10:05pm UTC](https://discuss.elastic.co/t/logstash-http-poller-first-url-requests-response-should-be-input-to-second-urls-request-param/51057/2 "2016-05-26T22:05:27Z")

</div>

There isn't unfortunately.

---

<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: [July 6, 2017, 4:55am UTC](https://discuss.elastic.co/t/logstash-http-poller-first-url-requests-response-should-be-input-to-second-urls-request-param/51057/3 "2017-07-06T04:55:58Z")

</div>


