Push data to external endpoints from losant edge agent

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?

From an Edge Workflow deployed in the container, you can use a Run Executable Node 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

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

On the same network as the agent? If so, you can use the agent’s built-in web server.

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.

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

You may find these helpful: