v2

latestSwagger 2.02026-07-13103553.7 KB

Detect anomaly status of the latest point in time series.

This operation generates a model by using the points that you sent in to the API and based on all data to determine whether the last point is anomalous.

post/timeseries/last/detect

Request body

granularity'yearly' | 'monthly' | 'weekly' | 'daily' | 'hourly' | 'minutely' | 'secondly' | 'microsecond' | 'none'
customIntervalinteger

A custom interval is used to set a nonstandard time interval. For example, if the series is 5 minutes, the request can be set as {"granularity":"minutely", "customInterval":5}.

periodinteger

Argument that indicates the periodic value of a time series. If the value is null or is not present, the API determines the period automatically.

maxAnomalyRationumber float

Argument that indicates an advanced model parameter. It's the maximum anomaly ratio in a time series.

sensitivityinteger

Argument that indicates an advanced model parameter between 0 and 99. The lower the value is, the larger the margin value is, which means fewer anomalies will be accepted.

imputeMode'auto' | 'previous' | 'linear' | 'fixed' | 'zero' | 'notFill'
imputeFixedValuenumber float

Specifies the value to fill. It's used when granularity is not "none" and imputeMode is "fixed".

Response

The request has succeeded.

periodinteger required

Frequency extracted from the series. Zero means no recurrent pattern has been found.

suggestedWindowinteger required

Suggested input series points needed for detecting the latest point.

expectedValuenumber float required

Expected value of the latest point.

upperMarginnumber float required

Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as a normal value. Adjusting the marginScale value enables the anomaly status of the latest point to be changed.

lowerMarginnumber float required

Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin.

isAnomalyboolean required

Anomaly status of the latest point. True means the latest point is an anomaly, either in the negative direction or in the positive direction.

isNegativeAnomalyboolean required

Anomaly status of the latest point in a negative direction. True means the latest point is an anomaly and its real value is smaller than the expected one.

isPositiveAnomalyboolean required

Anomaly status of the latest point in a positive direction. True means the latest point is an anomaly and its real value is larger than the expected one.

severitynumber float

Severity score for the last input point. The larger the value is, the more severe the anomaly is. For normal points, the severity is always 0.