# Push data to external endpoints from losant edge agent

**URL:** <https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522>\
**Category:** Help\
**Tags:** edge, http\
**Created:** [July 15, 2024, 2:00pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522 "2024-07-15T14:00:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [July 15, 2024, 2:00pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/1 "2024-07-15T14:00:47Z")

</div>

I am running my edge workflow in a docker. I want to send a JSON payload to an external endpoint (within the network) using an http node and this endpoint requires IP address of the Losant Edge agent to be configured in it (which is nginx). How can I get the IP address to configure it?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/5/57729b458610287fb68d42a1d222a0f1d039edbc.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/68d18448fe2cf1ca4803e04ce1e9f4f01d4aad32.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/ada5613897689d6ca8192e727e4ab12bd7cb9374.png)

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 15, 2024, 2:25pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/2 "2024-07-15T14:25:11Z")

</div>

From an [Edge Workflow](https://docs.losant.com/workflows/edge-workflows/) deployed in the container, you can use a [Run Executable Node](https://docs.losant.com/workflows/data/run-executable/) with the command `hostname -i` to get the IP address that the host assigned to the container. The IP address will be in `stdout` returned by the command.

However, I’m assuming you need this because you need to whitelist the IP address in your nginx config? In which case, you will have to get the IP address at the host level: [How to get a Docker container's IP address from the host - Stack Overflow](https://stackoverflow.com/questions/17157721/how-to-get-a-docker-containers-ip-address-from-the-host)

---

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [July 16, 2024, 11:58am UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/3 "2024-07-16T11:58:08Z")

</div>

How to get a URL with losant to post the data into edge agent? do you have any example flows ?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 16, 2024, 12:07pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/4 "2024-07-16T12:07:43Z")

</div>

On the same network as the agent? If so, you can use the [agent’s built-in web server](https://docs.losant.com/edge-compute/gateway-edge-agent/usage/#web-server-http-request-trigger--http-response-node).

If you are trying to send data to the agent through an internet-exposed endpoint, that’s a bit more complicated and involves forwarding the request over the agent’s connection to the MQTT broker. We have a [template that demonstrates this](https://app.losant.com/applications/recent/template-library?templateId=651c2d66147825e9acde1082).

---

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [July 16, 2024, 1:35pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/5 "2024-07-16T13:35:07Z")

</div>

> [@Dylan\_Schuster](#):
>
> involves forw

Yes, I understand that with MQTT and I am looking toward to posting a content into edge workflow towards http request node. So, for that, I need to put an IP Address. Both the applications running on same network

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 16, 2024, 2:05pm UTC](https://forums.losant.com/t/push-data-to-external-endpoints-from-losant-edge-agent/5522/6 "2024-07-16T14:05:35Z")

</div>

You may find these helpful:

- [Assign static IP to Docker container - Stack Overflow](https://stackoverflow.com/questions/27937185/assign-static-ip-to-docker-container)
- [java - How to send HTTP requests to my server running in a docker container? - Stack Overflow](https://stackoverflow.com/questions/36338538/how-to-send-http-requests-to-my-server-running-in-a-docker-container)
