# Help including host name in httpjson post request from UI

**URL:** <https://discuss.elastic.co/t/help-including-host-name-in-httpjson-post-request-from-ui/318456>\
**Category:** Elastic Agent\
**Created:** [November 8, 2022, 4:12pm UTC](https://discuss.elastic.co/t/help-including-host-name-in-httpjson-post-request-from-ui/318456 "2022-11-08T16:12:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Round](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_round/32/100807_2.png) [@Mark\_Round](https://discuss.elastic.co/u/Mark_Round)\
**Post date:** [November 8, 2022, 4:12pm UTC](https://discuss.elastic.co/t/help-including-host-name-in-httpjson-post-request-from-ui/318456/1 "2022-11-08T16:12:14Z")

</div>

I am configuring an HTTPJSON Input from Fleet using the UI and doing a POST on a REST endpoint. I need to send a body in the request. If I hard code the body as json {'hostname': 'currenthostname'} with a host name it works fine, what I need to know is how I substitute the host name of the agent into the post body in place of a hardcoded host name.  
I have tried [[host.hostname]] or [[agent.host]] but nothing seems to work. I think I just need to know the correct syntax to substitute the host name in the request body but I can't find anything that show the correct format.

---

<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:** [December 6, 2022, 4:12pm UTC](https://discuss.elastic.co/t/help-including-host-name-in-httpjson-post-request-from-ui/318456/2 "2022-12-06T16:12:28Z")

</div>

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