Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I'm looking for a service that returns the alerts by template. For Example, the AlertFunctions resource has a QueryAlertSummary. But this lists the alerts by Thing. If I have 2500 instances of a Template, I want to only see 1 row per alert, not 2500 rows.
Is there a service that does this?
Jenna, I don't believe we have a service that gets alerts at a Template level. While services like GetAlertSummary is based on Templates, it won't run at a Template level. You would have to run it a the Thing level.
If you just wanted to return a Status - a Device based on this Template has an Alert, you still will have to do a 'get alerts' on all Entities first, but your service can then examine the returned information and create a true/false response or something like that, or a count etc.
So you get one single result back.
Sorry when I say alerts, I mean alert definitions. The alerts defined on the template. I don't want a history of alerts. I just want to see that this property has an alert defined and what is the criteria for that alert, etc... Does that make sense?
I need a mashup that allows the user to create, disable/enable and delete alerts. I want them to be able to view all alerts defined for all device types. And add alerts by template or thing.
You can use GetAlertDefinitions and GetAlertDefinition on a ThingTemplate and AddOrUpdateAlert and RemoveAlert
Is there a service that does not require a property name parameter? I would like see all alert definitions for all properties of a template.