# Logstash HTTP plugin dynamic URL

**URL:** https://discuss.elastic.co/t/logstash-http-plugin-dynamic-url/184451
**Category:** Logstash
**Created:** [June 5, 2019, 8:46pm UTC](https://discuss.elastic.co/t/logstash-http-plugin-dynamic-url/184451 "2019-06-05T20:46:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hive](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hive/32/46651_2.png) [@hive](https://discuss.elastic.co/u/hive)
#### Post date: [June 5, 2019, 8:46pm UTC](https://discuss.elastic.co/t/logstash-http-plugin-dynamic-url/184451/1 "2019-06-05T20:46:44Z")

</div>

Dynamic URL with below does not work. When I replace the "oid" with a constant it works fine.

Can I have values changed in URL?

Thanks

output{  
http {  
format=\>"json"  
http\_method=\>"post"  
url=\>"[http://localhost:9200/my/associate/%{[oid]}/\_update?pretty](http://localhost:9200/my/associate/%25%7B%5Boid%5D%7D/_update?pretty)"  
}  
stdout{  
codec =\> json  
}  
}

---

<div class="post-metadata">

### Author: ![hive](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hive/32/46651_2.png) [@hive](https://discuss.elastic.co/u/hive)
#### Post date: [June 5, 2019, 9:15pm UTC](https://discuss.elastic.co/t/logstash-http-plugin-dynamic-url/184451/2 "2019-06-05T21:15:19Z")

</div>

answering my own question .. for someone with similar issues

Path referred in url "[script][params][pos][employee\_oid]" is really how JSON data is created in "filter" including hierarchy

output{  
http {  
format=\>"json"  
http\_method=\>"post"  
url=\>"[http://localhost:9200/my/associate/%{[script][params][pos][employee\_oid]}/\_update?pretty](http://localhost:9200/my/associate/%25%7B%5Bscript%5D%5Bparams%5D%5Bpos%5D%5Bemployee_oid%5D%7D/_update?pretty)"  
}  
stdout{  
codec =\> json  
}  
}

---

<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 3, 2019, 9:15pm UTC](https://discuss.elastic.co/t/logstash-http-plugin-dynamic-url/184451/3 "2019-07-03T21:15:28Z")

</div>

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