Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

HTTP requests within multi server environment

Answered

Comments

3 comments

  • Andrey Terentyev
    • Network Optix team

    Hello,

     Can i define that the request shall always be executed at "server 2"? 

    You can define the Server, where the API request has to be executed for triggering a Generic Event.

    Once the event has been triggered, the "Do HTTP Request" action should be executed on the same server.

    You may pass x-server-guid header, then request will be proxied to the server, of which guid is in the header.

    There is an alternative way -  changing the request path to something like
    https://192.168.0.101:7001/proxy/192.168.0.102:7001/api/createEvent
    ```

    0
  • Jonas Carlsson

    Hi Andrey,

    Many thanks! Do you have an example of how to "pass x-server-guid header"? I cannot find this within the API documentation. 

    0
  • Andrey Terentyev
    • Network Optix team

    Hi,

    In python you could do something like

    custom_header = {"x-server-guid": f"e3e9a385-7fe0-3ba5-5482-a86cde7f0000"}

    and then pass it to the request method

    response = requests.request(
            method,
            server_url,
          headers=custom_header
        )
    0

Please sign in to leave a comment.