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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to create a Anomaly alert using REST call to AddOrUpdateAlert?

ptc-2150956
5-Regular Member

How to create a Anomaly alert using REST call to AddOrUpdateAlert?

I am trying to create a Anomaly type of alert on a Thing/ThingTemplate using REST call to AddOrUpdateAlert.

But there is no way to set "Outbound Anomaly Rate", "Min Data Collection Time", "Certainty" and "Priority" properties, required for creating a Anomaly alert, through this API. I guess it must be through the "attributes" InfoTable input, but I am not sure how to pass these variables in this InfoTable. I couldn't find documentation also for the same.

Could anyone please help on this?

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:ptc-2150956)

Hi Priyankar

 

Actually some of the fields in the datashape are not really used. 

The only ones you need to care about are:

modelID: STRING
anomalyDetectionRate: INTEGER
trainingTime: INTEGER
certainty: NUMBER

 

If you do not specify the modelID, then a new alert is created that will go through the calibrating and training phase to create the new model.

This is the most likely use of it.

if you do specify modelID, then an alert will be created but the specified model will be used, so the alert will not go through calibrating and training  but use the model and goes to buffering.

 

Kind rgeards

Christophe

 

View solution in original post

5 REPLIES 5
cmorfin
19-Tanzanite
(To:ptc-2150956)

Hi

 

I think this article https://www.ptc.com/en/support/article?n=CS230216 can help.

Also, the datashape for anomaly looks as below

 

AnomalyDataShape.png

 

 

Hope this helps

Kind regards

Christophe

ptc-2150956
5-Regular Member
(To:cmorfin)

Hi Christophe,

 

I am able to create an Anomaly alert from my Java code by creating a InfoTable with below data-shape and passing this InfoTable to REST call to AddOrUpdateAlert. Thanks for that!

I still have a question. What should be probable values for modelID and secondaryProperties values? I am trying to create this alert on a ThingTemplate.

 

Regards,

Priyankar

cmorfin
19-Tanzanite
(To:ptc-2150956)

Hi Priyankar

 

Actually some of the fields in the datashape are not really used. 

The only ones you need to care about are:

modelID: STRING
anomalyDetectionRate: INTEGER
trainingTime: INTEGER
certainty: NUMBER

 

If you do not specify the modelID, then a new alert is created that will go through the calibrating and training phase to create the new model.

This is the most likely use of it.

if you do specify modelID, then an alert will be created but the specified model will be used, so the alert will not go through calibrating and training  but use the model and goes to buffering.

 

Kind rgeards

Christophe

 

mgoel
17-Peridot
(To:cmorfin)

Hi @ptc-2150956 Were you able to resolve this issue?

 

If yes then please mark Christophe's answer accept as solution or Do let us know in case of any question.

 

Regards,

Mohit

Thanks Christophe. It appears i do not have button to mark this as correct answer.  : (

Top Tags