Anomaly Detection Univariate API

Anomaly detection on a single time series.

OpenAPI Specification

anomaly-detection-univariate-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Azure AI Anomaly Detector ChangePoint Univariate API
  version: '1.0'
  description: 'Managed REST API service from Azure AI Services that monitors and detects

    anomalies in time series data without requiring machine learning expertise.

    Supports univariate batch detection across an entire series, last-point

    detection for streaming, and change-point detection. The multivariate API

    enables anomaly detection across up to 300 correlated signals.


    NOTE: The service is being retired on 1 October 2026 in favor of Microsoft

    Fabric real-time intelligence.

    '
  contact:
    name: Azure Anomaly Detector Support
    url: https://learn.microsoft.com/en-us/azure/ai-services/anomaly-detector/
servers:
- url: https://{resource-name}.cognitiveservices.azure.com/anomalydetector/v1.0
  description: Univariate Anomaly Detector v1.0 endpoint
  variables:
    resource-name:
      default: my-resource
      description: Name of the Azure AI resource provisioned in the Azure portal.
- url: https://{resource-name}.cognitiveservices.azure.com/anomalydetector/v1.1
  description: Anomaly Detector v1.1 (includes multivariate)
  variables:
    resource-name:
      default: my-resource
      description: Name of the Azure AI resource provisioned in the Azure portal.
security:
- SubscriptionKey: []
tags:
- name: Univariate
  description: Anomaly detection on a single time series.
paths:
  /timeseries/entire/detect:
    post:
      tags:
      - Univariate
      summary: Detect anomalies for entire series (batch)
      description: Detects anomalies across an entire series of data points as a batch.
      operationId: detectUnivariateEntireSeries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnivariateDetectionOptions'
      responses:
        '200':
          description: Batch detection result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnivariateEntireDetectionResult'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
  /timeseries/last/detect:
    post:
      tags:
      - Univariate
      summary: Detect anomaly status of the latest point (streaming)
      description: Detects whether the most recent point of a time series is an anomaly.
      operationId: detectUnivariateLastPoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnivariateDetectionOptions'
      responses:
        '200':
          description: Last-point detection result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnivariateLastDetectionResult'
        '400':
          $ref: '#/components/responses/ErrorResponse'
components:
  responses:
    ErrorResponse:
      description: An error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    TimeSeriesPoint:
      type: object
      required:
      - value
      properties:
        timestamp:
          type: string
          format: date-time
        value:
          type: number
    UnivariateEntireDetectionResult:
      type: object
      properties:
        period:
          type: integer
        expectedValues:
          type: array
          items:
            type: number
        upperMargins:
          type: array
          items:
            type: number
        lowerMargins:
          type: array
          items:
            type: number
        isAnomaly:
          type: array
          items:
            type: boolean
        isNegativeAnomaly:
          type: array
          items:
            type: boolean
        isPositiveAnomaly:
          type: array
          items:
            type: boolean
        severity:
          type: array
          items:
            type: number
    UnivariateDetectionOptions:
      type: object
      required:
      - series
      properties:
        series:
          type: array
          items:
            $ref: '#/components/schemas/TimeSeriesPoint'
        granularity:
          type: string
          enum:
          - yearly
          - monthly
          - weekly
          - daily
          - hourly
          - minutely
          - secondly
          - microsecond
          - none
        customInterval:
          type: integer
        period:
          type: integer
        maxAnomalyRatio:
          type: number
        sensitivity:
          type: integer
        imputeMode:
          type: string
          enum:
          - auto
          - previous
          - linear
          - fixed
          - zero
          - notFill
        imputeFixedValue:
          type: number
    UnivariateLastDetectionResult:
      type: object
      properties:
        period:
          type: integer
        suggestedWindow:
          type: integer
        expectedValue:
          type: number
        upperMargin:
          type: number
        lowerMargin:
          type: number
        isAnomaly:
          type: boolean
        isNegativeAnomaly:
          type: boolean
        isPositiveAnomaly:
          type: boolean
        severity:
          type: number
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    SubscriptionKey:
      type: apiKey
      in: header
      name: Ocp-Apim-Subscription-Key
      description: Azure Cognitive Services subscription key for the Anomaly Detector resource.