Azure pipeline running a Gateway Event Message

Hello all.

My idea is to run a pipeline in Azure, that it will import a CSV or JSON file into the VM running the ignition gateway. (This part is already working)

Once the file is in there, I then want to run a HTTP POST command from Azure Pipeline in order to trigger a Gateway Event Message in Ignition gateway side.

The problem is that I run everything on pipeline without any errors, however my Gateway Event Message is not being triggered.

This is my Azure Pipeline YML script:

          - powershell: |
              Write-Host "Calling Ignition Message Handler RunCSVImport..."
              $url = "http://<My-IP>:8088/system/gateway/message/global-project/RunCSVImport"
              $username = "$(IGN_USER)"
              $password = "$(IGN_PASS)"
              $pair = "${username}:${password}"
              $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair))
              Invoke-RestMethod -Uri $url -Method POST -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Body "{}"
            displayName: "Trigger CreateTagsByCSV"

This is my Gateway Event Message (RunCSVImport):

def handleMessage(payload):
    import system
    system.util.getLogger("RunCSVImport").info("Message Handler Triggered!")
    system.util.getLogger("RunCSVImport").info("Payload received: %s" % str(payload))

The message right now just contains logging information as I wanted to debug what was going on, however, checking the logs on Ignition side, I can’t see anything related.

Where can I find more information related with this subject?

Best Regards.

I've never seen a /system/gateway/message/... URL in Ignition. Looks like an LLM hallucination. Use the WebDev module.

1 Like

Ignition message handling only works from an already connected context - e.g. over the persistent gateway network websocket, or between clients/designers that already have an established session to communicate via RPC. There's no such arbitrary POST endpoint, though you are absolutely able to create one with the WebDev module as Phil mentioned.

Thank you for the messages.

I will check WebDev Module now.

It worked with WebDev module.

Thank you again.