# Any direct API for subscribing to alarms and Acknowledging alarms?

**URL:** <https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706>\
**Category:** Ignition\
**Created:** [September 30, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706 "2022-09-30T14:29:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hello\_World](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hello\_World](https://forum.inductiveautomation.com/u/Hello_World)\
**Post date:** [September 30, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/1 "2022-09-30T14:29:47Z")

</div>

Hello, I am building a custom C# application that will communicate with Ignition, get the Alarms from it, and process it and user can acknowledge those alarms from our application.

I was playing with Ignition for a day now and it seems like Ignition does not provide any direct API where I can just hook in to get all the alarms. And I don't think it exposes any direct API where I can call to acknowledge alarms. Is my understanding correct?

So, I see that Ignition SCADA is modular architecture and it supports other modules. So, for my use case I think, I need to build a custom module. If I need to build a custom module, can I host some service (like some gRPC service) from a custom module. So, my C# application can subscribe, get the alarm information, and send acknowledgement request to that service. Saying that are there any restrictions on what custom modules can do?

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 30, 2022, 3:27pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/2 "2022-09-30T15:27:51Z")

</div>

> [@Hello\_World](#):
>
> I was playing with Ignition for a day now and it seems like Ignition does not provide any direct API where I can just hook in to get all the alarms. And I don't think it exposes any direct API where I can call to acknowledge alarms. Is my understanding correct?

There isn't something directly, however you could use the [webdev module](https://docs.inductiveautomation.com/display/DOC81/Web+Dev) to create endpoints that do both of these things for you. This would be significantly simpler than creating your own module, as it would allow you to just use the built in python scripting and functions provided under [system.alarm](https://docs.inductiveautomation.com/display/DOC81/system.alarm)

---

<div class="post-metadata">

**Author:** ![Hello\_World](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hello\_World](https://forum.inductiveautomation.com/u/Hello_World)\
**Post date:** [September 30, 2022, 3:31pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/3 "2022-09-30T15:31:41Z")

</div>

Thank you very much. I will look into it.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 30, 2022, 8:12pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/4 "2022-09-30T20:12:51Z")

</div>

You might take some inspiration from this magical post:

> [@New Alarm Alert as a Popup](https://forum.inductiveautomation.com/t/new-alarm-alert-as-a-popup/15828/2):
>
> I would start this a different route. It looks like you are polling for changes to alarm states, when really, we should be reacting to events relating to alarm state changes. This is going to be a long winded answer, so hear goes. Create a new shared script. For this example, create it at shared.alarming. The following will create an object, that extends Ignition’s AlarmListener interface. This is how we get the alarm event from the gateway to the client. Post the following code: from c…

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 30, 2022, 8:26pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/5 "2022-09-30T20:26:44Z")

</div>

Out of curiosity.. does the AlarmListener class even exist without the alarm notification module?

> [@New Alarm Alert as a Popup](https://forum.inductiveautomation.com/t/new-alarm-alert-as-a-popup/15828/2):
>
> I would start this a different route. It looks like you are polling for changes to alarm states, when really, we should be reacting to events relating to alarm state changes. This is going to be a long winded answer, so hear goes. Create a new shared script. For this example, create it at shared.alarming. The following will create an object, that extends Ignition’s AlarmListener interface. This is how we get the alarm event from the gateway to the client. Post the following code: from c…

If so.... a bit of a direct circumvention of the module lol

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 30, 2022, 8:28pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/6 "2022-09-30T20:28:20Z")

</div>

sounds like using tag change events to write into a database to circumvent the SQL bridge module 🙂

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 30, 2022, 8:30pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/7 "2022-09-30T20:30:39Z")

</div>

> [@nminchin](#):
>
> SQL bridge module

I do think though a difference with this one, is that SQL bridge isn't intended to be the _only_ way to store data, its just the _easiest_ way for new users to store data.

I got the impression that Alarm Notification was intended to be the _only_ way since it was the only thing with Pipelines. I guess you could always write a tag event script on the alarm states though

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 30, 2022, 8:30pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/8 "2022-09-30T20:30:59Z")

</div>

Meh. Alarm _notification_ is different from "alarming". If you want to do something that hacky (and maintain it indefinitely) yourself, by all means.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 30, 2022, 8:33pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/9 "2022-09-30T20:33:26Z")

</div>

> [@kgamble](#):
>
> its just the _easiest_ way for new users to store data.

I'd beg to differ actually. I still haven't used the SQL bridge module as every time I've looked at it I've been lost and unsure how to do the things I want 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 30, 2022, 8:37pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/10 "2022-09-30T20:37:49Z")

</div>

> [@nminchin](#):
>
> I'd beg to differ actually. I still haven't used the SQL bridge module

This is a whole thing, and trust me, I get it. I have never released SQL bridge into a production application, but I think in this case you and I are the exception and not the rule. I think the general rule of thumb is if your forum title is `Regular` than you probably don't daily drive transaction groups 🙂 lol

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 3, 2022, 11:17am UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/11 "2022-10-03T11:17:05Z")

</div>

> [@kgamble](#):
>
> I have never released SQL bridge into a production application

The stored procedure groups actually work quite well as a "replacement" for FactoryTalk transaction manager. Back when we started we purchased it, thinking (due to it's name) that it was something different than it actually is. I have now completely removed our FTTM servers.

Outside of that, though, I would agree that I tend to navigate to just using scripts.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 3, 2022, 12:32pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/12 "2022-10-03T12:32:39Z")

</div>

I often need more robust handshaking than offered by transaction groups. But for things that don't need confirmation (or a missed row is ok), transaction groups are way easier for clients to maintain.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 3, 2022, 1:09pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/13 "2022-10-03T13:09:09Z")

</div>

> [@lrose](#):
>
> Back when we started we purchased it, thinking (due to it's name) that it was something different than it actually is

Ahhh, the classic “wait… I don’t need SQL bridge to connect to a SQL database??”

We’ve all been through it

---

<div class="post-metadata">

**Author:** ![Hello\_World](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hello\_World](https://forum.inductiveautomation.com/u/Hello_World)\
**Post date:** [October 5, 2022, 9:28pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/14 "2022-10-05T21:28:19Z")

</div>

Thank you for all the responses. Another quick question looks like Ignition has its own OPC UA server does that OPC UA exposes anyway of Acknowledging of Alarms, or it is only data?

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [October 6, 2022, 5:06am UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/15 "2022-10-06T05:06:40Z")

</div>

You could configure tags in Ignition to do what you need and connect to them through OPC UA.

---

<div class="post-metadata">

**Author:** ![Hello\_World](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hello\_World](https://forum.inductiveautomation.com/u/Hello_World)\
**Post date:** [October 6, 2022, 1:20pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/16 "2022-10-06T13:20:51Z")

</div>

Yes, I could configure a tag on OPC UA and communicate with it. But I was wondering what type of OPC UA Server Ignition exposes. is it OPC UA data only or OPC UA A&C. I think if it is OPC UA A&C then I think I can acknowledge alarms.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 6, 2022, 2:14pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/17 "2022-10-06T14:14:08Z")

</div>

> [@Hello\_World](#):
>
> OPC UA data only

This.

---

<div class="post-metadata">

**Author:** ![Hello\_World](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hello\_World](https://forum.inductiveautomation.com/u/Hello_World)\
**Post date:** [October 7, 2022, 2:54pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/18 "2022-10-07T14:54:58Z")

</div>

One final question out of curiosity, Can I extend the Ignition OPC UA data server and add acknowledgement capability to it. Does Ignition allow something like that?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 7, 2022, 3:03pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/19 "2022-10-07T15:03:17Z")

</div>

> [@Hello\_World](#):
>
> Can I extend the Ignition OPC UA data server

No. You can only extend it by adding custom drivers.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 7, 2022, 3:03pm UTC](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706/20 "2022-10-07T15:03:38Z")

</div>

> [@Hello\_World](#):
>
> Can I extend the Ignition OPC UA data server and add acknowledgement capability to it.

You could technically do something like this with adding a tag change script to an "acknowledgment" tag, that will use [system.alarm.acknowledge](https://docs.inductiveautomation.com/display/DOC81/system.alarm.acknowledge) to acknowledge a specific alarm.

Then when you set the "acknowledgement" tag to `True` it would run the script, and acknowledge the alarm.

[Next page](https://forum.inductiveautomation.com/t/any-direct-api-for-subscribing-to-alarms-and-acknowledging-alarms/64706.md?page=2)
