Is it possible to trigger an output in milestone from rest API

From Smart client you kan make a button to an output by dragging an output

to the camera view, im trying to use the same function thru the REST API

I can view the outputs from the API by invoking http://URL-to-server/API/rest/v1/outputs

{

  "displayName": "MEDguard - Dagläge",

  "enabled": true,

  "id": "dd59bb44-eaed-4f5b-85da-eb106dbbe37a",

  "name": "MEDguard - Dagläge",

  "channel": 5,

  "description": "",

  "createdDate": "0001-01-01T00:00:00.0000000",

  "lastModified": "2024-01-11T08:50:07.0630000Z",

  "gisPoint": "POINT EMPTY",

  "shortName": "",

  "icon": 0,

  "coverageDirection": "0",

  "coverageDepth": "0",

  "coverageFieldOfView": "0",

  "relations": {

    "parent": {

      "type": "hardware",

      "id": "d05ec3a5-1e2d-417e-badd-b46871f39d6b"

    },

    "self": {

      "type": "outputs",

      "id": "dd59bb44-eaed-4f5b-85da-eb106dbbe37a"

    }

  }

},

So the question is

Is it possible to trigger an output in milestone from rest API, if it’s possible. What endpoint should i use?

Thanks in advance

//Tony

No, currently the Rest API can give you configuration information about the outputs but you cannot activate or trigger them. The Rest API will be extended and it is the plan that it will be possible to command the outputs in a future version. Right now we cannot tell you when this will come.

Ok Thanks,

We and our consultant are developing a custom mobile app, connecting to our Milestone server via API Gateway/RestAPI.

I’ve learned that it’s not yet possible to read/trigger Milestone events, or hardware outputs. As far as I know it’s on the roadmap, but I don’t know if it’s planned in the next release or later.

We would like to know when to expect these functions to be available in the API?

If it’s worth waiting, or if this feature is planned years from now and we need to implement the SDK’s instead to get the ability to read and trigger events and outputs.

Or is there another way forward that you can direct me to.

Best regards

//Tony

You could develop a service, implemented using the MIP SDK, that could trigger the events, and could communicate with your custom mobile app in your preferred way.

Hi,

The REST API is planned to support activation of external outputs, however that feature is currently on the roadmap.

If you prefer to utilize the REST API, you can

  • define an Analytics Event
  • define a Rule based on that Event with an Action to Set the device output to the desired state.

and eventually utilize the Events REST API to trigger that Event.

  • Dependent on the desired flexibility, you can control the output on the devices from the Event’s metadata

Find out more about the Events REST API here: https://doc.developer.milestonesys.com/mipvmsapi/api-overview/integrations/events/