Generating Events from HTTP POST

Please forgive my ignorance, I am far from a developer.

We have emergency call stations that can send HTTP POST messages to a specified IP. Milestone Support advised that direct messaging to a Milestone Event Server has been discontinued, and that we will have to utilize MIP SDK to accomplish our goal. Ultimately, we want the HTTP POST to trigger a rule that moves a corresponding camera. How do I begin to configure this?

Hi @Kyle Montague​,

There are a couple of methods for pushing events into Milestone without developing an integration:

  1. Generic Events: You can define a generic event with a specific pattern to look for. When that pattern appears in a raw TCP/UDP message on whatever port you define for receiving generic events, that generic event is triggered, and that trigger can be used in a rule to act on a camera.
  2. Analytic Events: You can send a “MAD” formatted XML document to the event server if analytics events are enabled (Management Client > Tools > Options > Analytics Events).

Depending on how your call stations send their HTTP POST message, you might be able to leverage generic events. But the generic events port isn’t designed to respond like a web server, so unless the call station blindly sends the whole HTTP message without expecting an HTTP response from Milestone, this may not work. And I don’t think the Analytics Events option would work for this use case.

It’s relatively easy (for a .net developer) to write a .NET plugin that will listen for incoming “webhook” or HTTP POST message, and we support custom rule actions via plugins. There’s a sample rule action plugin called BATAction on GitHub for reference.

Ideally, we would extend our built-in webhooks feature to not only send webhooks (which it currently does) but to also receive webhooks and reference them in rules. That’s not something that’s planned, but I’ll definitely suggest it to the team.