Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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?
Solved! Go to Solution.
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
Hi
I think this article https://www.ptc.com/en/support/article?n=CS230216 can help.
Also, the datashape for anomaly looks as below
Hope this helps
Kind regards
Christophe
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
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
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. : (