Register for Alerts - GET /alerts_longpoll/<jobId>

Register for alert on bucket results or influencer scores including interim results.


curl 'http://localhost:8080/engine/v2/alerts_longpoll/my_job?alertOn=bucket&score=80'



The source of the alert is either the influencer score, bucket influencer score or the bucket anomaly score/probability. This parameter dictates which type(s) you wish to alert on and can be any combination of influencer, bucketinfluencer or bucket. Default is bucket:


Register for alerts where the anomaly score is greater than or equal to a particular value:


Applies when alertOn=bucket. The anomaly score is an aggregation of the probabilities of anomaly records for the bucket time interval. You may wish to alert on the probability of individual anomaly records, in which case use this probability parameter. As it is not aggregated, this will typically produce more alerts. The value must be in the range 0 - 100.:


Alert on anomaly score and normalized probability by providing both parameters:


If true then alerts will be generated on interim results otherwise interim results are ignored.


Change request timeout setting. The default is 90 seconds:



Either score or probability must be provided for a valid request and must be in the range 0-100 inclusive.


If an alert is fired or the alert times out HTTP status code 200 is returned along with a JSON alert object.

If the alert’s timeout field is true then the request has timed out and should be repeated:

  "timeout" : true,
  "alertType" : "bucket",
  "jobId" : "cloudwatch",
  "anomalyScore" : 0.0,
  "maxNormalizedProbability" : 0.0,
  "isInterim" : false

If the alert has triggered, its actual content depends on the alert request:

  • Requests made with the probability parameter return an alert object containing all the records with a normalized probability greater than or equal to the argument.
  • Requests made with the score parameter return an alert object containing the bucket with anomaly score greater than or equal to the argument.
  • If probability and score were set and both triggered then the alert contains the bucket. The anomaly records can be accessed by a secondary call to get the buckets details.


If the HTTP status code equals 400 the API could not process the request and an Error object is returned, for other status codes please examine the response message.

See the Error Codes documentation for the full list of errors that may be returned by the API.