---
title: "Detect Multivariate Anomaly"
method: POST
path: "/multivariate/models/{modelId}:detect-batch"
---

# Detect Multivariate Anomaly

`POST /multivariate/models/{modelId}:detect-batch`

Submit a multivariate anomaly detection task with the modelId value of a trained model
and inference data. The input schema should be the same with the training
request. The request will finish asynchronously and return a resultId value to
query the detection result. The request should be a source link to indicate an
externally accessible Azure Storage URI that either points to an Azure Blob
Storage folder or points to a CSV file in Azure Blob Storage.

## Path parameters

- `modelId` string, required

## Request body

- MultivariateMultivariateBatchDetectionOptions — Detection request for batch inference. This is an asynchronous inference that will need another API to get detection results.
  - `dataSource` string, uri, required — Source link to the input data to indicate an accessible Azure Storage URI. It either points to an Azure Blob Storage folder or points to a CSV file in Azure Blob Storage, based on your data schema selection. The data schema should be exactly the same as those used in the training phase. The input data must contain at least slidingWindow entries preceding the start time of the data to be detected.
  - `topContributorCount` integer — Number of top contributed variables for one anomalous time stamp in the response.
  - `startTime` string, date-time, required — Start date/time of data for detection, which should be in ISO 8601 format.
  - `endTime` string, date-time, required — End date/time of data for detection, which should be in ISO 8601 format.

## Response `202`

The request has been accepted for processing, but processing has not yet completed.

- MultivariateMultivariateDetectionResult — Detection results for the resultId value.
  - `resultId` string, uuid, required — Universally Unique Identifier
  - `summary` MultivariateMultivariateBatchDetectionResultSummary, required — Multivariate anomaly detection status.
    - `status` 'CREATED' | 'RUNNING' | 'READY' | 'FAILED', required
    - `errors` MultivariateErrorResponse[] — Error message when detection fails.
      - `code` string, required — Error code.
      - `message` string, required — Message that explains the error that the service reported.
    - `variableStates` MultivariateVariableState[] — Variable status.
      - `variable` string — Variable name in variable states.
      - `filledNARatio` number, float — Proportion of missing values that need to be filled by fillNAMethod.
      - `effectiveCount` integer — Number of effective data points before fillNAMethod is applied.
      - `firstTimestamp` string, date-time — First valid time stamp with a value of input data.
      - `lastTimestamp` string, date-time — Last valid time stamp with a value of input data.
    - `setupInfo` MultivariateMultivariateBatchDetectionOptions, required — Detection request for batch inference. This is an asynchronous inference that will need another API to get detection results.
      - `dataSource` string, uri, required — Source link to the input data to indicate an accessible Azure Storage URI. It either points to an Azure Blob Storage folder or points to a CSV file in Azure Blob Storage, based on your data schema selection. The data schema should be exactly the same as those used in the training phase. The input data must contain at least slidingWindow entries preceding the start time of the data to be detected.
      - `topContributorCount` integer — Number of top contributed variables for one anomalous time stamp in the response.
      - `startTime` string, date-time, required — Start date/time of data for detection, which should be in ISO 8601 format.
      - `endTime` string, date-time, required — End date/time of data for detection, which should be in ISO 8601 format.
  - `results` MultivariateAnomalyState[], required — Detection result for each time stamp.
    - `timestamp` string, date-time, required — Time stamp for this anomaly.
    - `value` MultivariateAnomalyValue — Detailed information of the anomalous time stamp.
      - `isAnomaly` boolean, required — True if an anomaly is detected at the current time stamp.
      - `severity` number, float, required — Indicates the significance of the anomaly. The higher the severity, the more significant the anomaly is.
      - `score` number, float, required — Raw anomaly score of severity, to help indicate the degree of abnormality.
      - `interpretation` MultivariateAnomalyInterpretation[] — Interpretation of this anomalous time stamp.
        - `variable` string — Variable.
        - `contributionScore` number, float — This score shows the percentage that contributes to the anomalous time stamp. It's a number between 0 and 1.
        - `correlationChanges` MultivariateCorrelationChanges — Correlation changes among the anomalous variables.
          - `changedVariables` string[] — Correlated variables that have correlation changes under an anomaly.
    - `errors` MultivariateErrorResponse[] — Error message for the current time stamp.
      - `code` string, required — Error code.
      - `message` string, required — Message that explains the error that the service reported.

## 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/versions/3d72cecb974e/schema)
