cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Alerts of all Things

sankararaman
10-Marble

Alerts of all Things

How can I get the list of all the alerts that are configured for each Thing.

sankararaman_0-1627278762799.png

 

ACCEPTED SOLUTION

Accepted Solutions
TonyZhang
14-Alexandrite
(To:sankararaman)

Using GetAlertStatuses service/API will return a list of alerts configured for a Thing. Also you can use this service at ThingTemplate level.

  • custom service: Things["ThingName"].GetAlertStatuses();
  • OR send POST request to http(s)://host:port/Thingworx/Things/ThingName/Services/GetAlertStatuses

 

However you will only get alertnames, property and status information but not detailed configuration/condition of each alert.

You will probably need to loop through the above result and use service like GetAlertDefinition to get detailed alert condition.

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:sankararaman)

I think you may have to iterate and then put the lists together and then sort them.

TonyZhang
14-Alexandrite
(To:sankararaman)

Using GetAlertStatuses service/API will return a list of alerts configured for a Thing. Also you can use this service at ThingTemplate level.

  • custom service: Things["ThingName"].GetAlertStatuses();
  • OR send POST request to http(s)://host:port/Thingworx/Things/ThingName/Services/GetAlertStatuses

 

However you will only get alertnames, property and status information but not detailed configuration/condition of each alert.

You will probably need to loop through the above result and use service like GetAlertDefinition to get detailed alert condition.

TonyZhang
14-Alexandrite
(To:sankararaman)

Hi @sankararaman,

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards,

Tony

Announcements


Top Tags