---
title: "Detect anomalies for the entire series in batch."
method: POST
path: "/timeseries/entire/detect"
---

# Detect anomalies for the entire series in batch.

`POST /timeseries/entire/detect`

This operation generates a model with an entire series. Each point is detected
with the same model. With this method, points before and after a certain point
are used to determine whether it's an anomaly. The entire detection can give the
user an overall status of the time series.

## Request body

- UnivariateUnivariateDetectionOptions — Request of the entire or last anomaly detection.
  - `series` UnivariateTimeSeriesPoint[], required — Time series data points. Points should be sorted by time stamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there's a duplicated time stamp, the API won't work. In such a case, an error message is returned.
    - `timestamp` string, date-time — Argument that indicates the time stamp of a data point (ISO8601 format).
    - `value` number, float, required — Measurement of that point.
  - `granularity` 'yearly' | 'monthly' | 'weekly' | 'daily' | 'hourly' | 'minutely' | 'secondly' | 'microsecond' | 'none'
  - `customInterval` integer — 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}.
  - `period` integer — 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.
  - `maxAnomalyRatio` number, float — Argument that indicates an advanced model parameter. It's the maximum anomaly ratio in a time series.
  - `sensitivity` integer — 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'
  - `imputeFixedValue` number, float — Specifies the value to fill. It's used when granularity is not "none" and imputeMode is "fixed".

## Response `200`

The request has succeeded.

- UnivariateUnivariateEntireDetectionResult — Response of the entire anomaly detection.
  - `period` integer, required — Frequency extracted from the series. Zero means no recurrent pattern has been found.
  - `expectedValues` number[], required — Expected value for each input point. The index of the array is consistent with the input series.
  - `upperMargins` number[], required — Upper margin of each input point. UpperMargin is used to calculate upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. Anomalies in the response can be filtered by upperBoundary and lowerBoundary. Adjusting the marginScale value can help filter less significant anomalies on the client side. The index of the array is consistent with the input series.
  - `lowerMargins` number[], required — Lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones on the client side. The index of the array is consistent with the input series.
  - `isAnomaly` boolean[], required — Anomaly properties for each input point. True means an anomaly (either negative or positive) has been detected. The index of the array is consistent with the input series.
  - `isNegativeAnomaly` boolean[], required — Anomaly status in a negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.
  - `isPositiveAnomaly` boolean[], required — Anomaly status in a positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.
  - `severity` number[] — Severity score for each input point. The larger the value is, the more severe the anomaly is. For normal points, the severity is always 0.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/cognitiveservices-anomalydetector.md) · [All operations](https://skmtc.net/azure/apis/cognitiveservices-anomalydetector/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/cognitiveservices-anomalydetector/revisions/3d72cecb974e/schema)
