Anomaly Detector v1.1

Anomaly Detector is an AI service with a set of APIs, which enables you to monitor and detect anomalies in your time series data with little ML knowledge, either batch validation or real-time inference. It includes the following features:

  • Univariate Anomaly Detection - Detect different types of anomalies in single variable.
  • Multivariate Anomaly Detection - Detect different types of anomalies in multiple variables from your equipment or system.

Multivariate Anomaly Detection - Train a Multivariate Anomaly Detection Model

Create and train a multivariate anomaly detection model. The request must include a source parameter to indicate an externally accessible Azure blob storage URI.There are two types of data input: An URI pointed to an Azure blob storage folder which contains multiple CSV files, and each CSV file contains two columns, timestamp and variable. Another type of input is an URI pointed to a CSV file in Azure blob storage, which contains all the variables and a timestamp column.

Select the testing console in the region where you created your resource:

Open API testing console

Request URL

Request headers

string
Media type of the body sent to the API.
string
Subscription key which provides access to this API. Found in your Cognitive Services accounts.

Request body

Training request

{
  "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv",
  "dataSchema": "OneTable",
  "startTime": "2022-04-01T00:00:00Z",
  "endTime": "2022-04-02T00:00:00Z",
  "displayName": "MultiAD-Sample",
  "slidingWindow": 200,
  "alignPolicy": {
    "alignMode": "Outer",
    "fillNAMethod": "Linear",
    "paddingValue": 0
  },
  "status": "READY",
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ],
  "diagnosticsInfo": {
    "modelState": {
      "epochIds": [
        10,
        20,
        30,
        40,
        50,
        60,
        70,
        80,
        90,
        100
      ],
      "trainLosses": [
        0.62913280725479126,
        0.16713269054889679,
        0.12354248017072678,
        0.102596640586853,
        0.0958492755889892,
        0.090699523687362671,
        0.0868601649999618,
        0.0860302299261093,
        0.082873545587062836,
        0.0823553800582885
      ],
      "validationLosses": [
        0.95734274387359619,
        0.31822299957275391,
        0.34026464819908142,
        0.27653488516807551,
        0.25740143656730652,
        0.269286036491394,
        0.26372304558753967,
        0.25908330082893372,
        0.2597166895866394,
        0.25973501801490778
      ],
      "latenciesInSeconds": [
        0.3398594856262207,
        0.3659665584564209,
        0.37360644340515131,
        0.35134077072143549,
        0.33703041076660151,
        0.31876277923583979,
        0.32833099365234369,
        0.35035872459411621,
        0.30800247192382813,
        0.3327946662902832
      ]
    },
    "variableStates": [
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_1"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_2"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_3"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_4"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_5"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_6"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_7"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_8"
      },
      {
        "effectiveCount": 1441,
        "lastTimestamp": "2022-04-02T00:00:00Z",
        "filledNARatio": 0,
        "firstTimestamp": "2022-04-01T00:00:00Z",
        "variable": "variable_9"
      }
    ]
  }
}
{
  "required": [
    "dataSource",
    "endTime",
    "startTime"
  ],
  "properties": {
    "dataSource": {
      "type": "string",
      "description": "Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. ",
      "example": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"
    },
    "dataSchema": {
      "description": "Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable.",
      "enum": [
        "OneTable",
        "MultiTable"
      ],
      "example": "OneTable",
      "type": "string",
      "x-ms-enum": {
        "modelAsString": false,
        "name": "DataSchema",
        "values": [
          {
            "value": "OneTable",
            "description": "OneTable means that your input data are all in one CSV file, which contains one 'timestamp' column and several variable columns. The default DataSchema is OneTable."
          },
          {
            "value": "MultiTable",
            "description": "MultiTable means that your input data are separated in multiple CSV files, in each file containing one 'timestamp' column and one 'variable' column, and the CSV file name should indicate the name of the variable. The default DataSchema is OneTable."
          }
        ]
      }
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "description": "A required field, indicating the start time of training data, which should be date-time of ISO 8601 format.",
      "example": "2022-04-01T00:00:00Z"
    },
    "endTime": {
      "type": "string",
      "format": "date-time",
      "description": "A required field, indicating the end time of training data, which should be date-time of ISO 8601 format.",
      "example": "2022-04-02T00:00:00Z"
    },
    "displayName": {
      "type": "string",
      "description": "An optional field. The display name of the model whose maximum length is 24 characters.",
      "example": "MultiAD-Sample",
      "maxLength": 24
    },
    "slidingWindow": {
      "type": "integer",
      "description": "An optional field, indicating how many previous timestamps will be used to detect whether the timestamp is anomaly or not. ",
      "example": 200
    },
    "alignPolicy": {
      "properties": {
        "alignMode": {
          "enum": [
            "Inner",
            "Outer"
          ],
          "example": "Outer",
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "alignMode",
            "values": [
              {
                "value": "Inner"
              },
              {
                "value": "Outer"
              }
            ]
          },
          "description": "An optional field, indicating how to align different variables to the same time-range. Either Inner or Outer. "
        },
        "fillNAMethod": {
          "enum": [
            "Previous",
            "Subsequent",
            "Linear",
            "Zero",
            "Fixed"
          ],
          "example": "Linear",
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "fillNAMethod",
            "values": [
              {
                "value": "Previous"
              },
              {
                "value": "Subsequent"
              },
              {
                "value": "Linear"
              },
              {
                "value": "Zero"
              },
              {
                "value": "Fixed"
              }
            ]
          },
          "description": "An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed."
        },
        "paddingValue": {
          "type": "number",
          "description": "An optional field. Required when fillNAMethod is Fixed."
        }
      },
      "type": "object",
      "description": "An optional field, indicating the manner to align multiple variables."
    },
    "status": {
      "description": "Model status. One of CREATED, RUNNING, READY, and FAILED.",
      "enum": [
        "CREATED",
        "RUNNING",
        "READY",
        "FAILED"
      ],
      "example": "READY",
      "type": "string",
      "x-ms-enum": {
        "modelAsString": false,
        "name": "modelStatus",
        "values": [
          {
            "value": "CREATED"
          },
          {
            "value": "RUNNING"
          },
          {
            "value": "READY"
          },
          {
            "value": "FAILED"
          }
        ]
      }
    },
    "errors": {
      "type": "array",
      "description": "Error messages when failed to create a model.",
      "items": {
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The error code."
          },
          "message": {
            "type": "string",
            "description": "The message explaining the error reported by the service."
          }
        },
        "type": "object"
      }
    },
    "diagnosticsInfo": {
      "properties": {
        "modelState": {
          "properties": {
            "epochIds": {
              "type": "array",
              "description": "This indicates the number of passes of the entire training dataset the algorithm has completed.",
              "example": [
                10,
                20,
                30,
                40,
                50,
                60,
                70,
                80,
                90,
                100
              ],
              "items": {
                "type": "integer"
              }
            },
            "trainLosses": {
              "type": "array",
              "description": "List of metrics used to assess how the model fits the training data for each epoch.",
              "example": [
                0.62913280725479126,
                0.16713269054889679,
                0.12354248017072678,
                0.102596640586853,
                0.0958492755889892,
                0.090699523687362671,
                0.0868601649999618,
                0.0860302299261093,
                0.082873545587062836,
                0.0823553800582885
              ],
              "items": {
                "type": "number"
              }
            },
            "validationLosses": {
              "type": "array",
              "description": "List of metrics used to assess how the model fits the validation set for each epoch.",
              "example": [
                0.95734274387359619,
                0.31822299957275391,
                0.34026464819908142,
                0.27653488516807551,
                0.25740143656730652,
                0.269286036491394,
                0.26372304558753967,
                0.25908330082893372,
                0.2597166895866394,
                0.25973501801490778
              ],
              "items": {
                "type": "number"
              }
            },
            "latenciesInSeconds": {
              "type": "array",
              "description": "Latency for each epoch. ",
              "example": [
                0.3398594856262207,
                0.3659665584564209,
                0.37360644340515131,
                0.35134077072143549,
                0.33703041076660151,
                0.31876277923583979,
                0.32833099365234369,
                0.35035872459411621,
                0.30800247192382813,
                0.3327946662902832
              ],
              "items": {
                "type": "number"
              }
            }
          },
          "type": "object"
        },
        "variableStates": {
          "type": "array",
          "example": [
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_1"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_2"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_3"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_4"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_5"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_6"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_7"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_8"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_9"
            }
          ],
          "items": {
            "properties": {
              "variable": {
                "type": "string",
                "description": "Variable name in variable states."
              },
              "filledNARatio": {
                "type": "number",
                "description": "Proportion of missing values that need to be filled by fillNAMethod.",
                "minimum": 0,
                "maximum": 1
              },
              "effectiveCount": {
                "type": "integer",
                "description": "Number of effective data points before applying fillNAMethod."
              },
              "firstTimestamp": {
                "type": "string",
                "format": "date-time",
                "description": "First valid timestamp with value of input data."
              },
              "lastTimestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Last valid timestamp with value of input data."
              }
            },
            "type": "object"
          }
        }
      },
      "type": "object",
      "description": "Diagnostics information to help inspect the states of model or variable."
    }
  },
  "type": "object",
  "description": "Training result of a model including its status, errors and diagnostics information.",
  "example": {
    "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv",
    "dataSchema": "OneTable",
    "startTime": "2022-04-01T00:00:00Z",
    "endTime": "2022-04-02T00:00:00Z",
    "displayName": "MultiAD-Sample",
    "slidingWindow": 200,
    "alignPolicy": {
      "alignMode": "Outer",
      "fillNAMethod": "Linear",
      "paddingValue": 0
    },
    "status": "READY",
    "errors": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "diagnosticsInfo": {
      "modelState": {
        "epochIds": [
          10,
          20,
          30,
          40,
          50,
          60,
          70,
          80,
          90,
          100
        ],
        "trainLosses": [
          0.62913280725479126,
          0.16713269054889679,
          0.12354248017072678,
          0.102596640586853,
          0.0958492755889892,
          0.090699523687362671,
          0.0868601649999618,
          0.0860302299261093,
          0.082873545587062836,
          0.0823553800582885
        ],
        "validationLosses": [
          0.95734274387359619,
          0.31822299957275391,
          0.34026464819908142,
          0.27653488516807551,
          0.25740143656730652,
          0.269286036491394,
          0.26372304558753967,
          0.25908330082893372,
          0.2597166895866394,
          0.25973501801490778
        ],
        "latenciesInSeconds": [
          0.3398594856262207,
          0.3659665584564209,
          0.37360644340515131,
          0.35134077072143549,
          0.33703041076660151,
          0.31876277923583979,
          0.32833099365234369,
          0.35035872459411621,
          0.30800247192382813,
          0.3327946662902832
        ]
      },
      "variableStates": [
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_1"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_2"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_3"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_4"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_5"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_6"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_7"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_8"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_9"
        }
      ]
    }
  }
}

Response 201

Create and train a multivariate anomaly detection model.

{
  "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f",
  "createdTime": "2022-11-01T00:00:00Z",
  "lastUpdatedTime": "2022-11-01T00:00:00Z",
  "modelInfo": {
    "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv",
    "dataSchema": "OneTable",
    "startTime": "2022-04-01T00:00:00Z",
    "endTime": "2022-04-02T00:00:00Z",
    "displayName": "MultiAD-Sample",
    "slidingWindow": 200,
    "alignPolicy": {
      "alignMode": "Outer",
      "fillNAMethod": "Linear",
      "paddingValue": 0
    },
    "status": "READY",
    "errors": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "diagnosticsInfo": {
      "modelState": {
        "epochIds": [
          10,
          20,
          30,
          40,
          50,
          60,
          70,
          80,
          90,
          100
        ],
        "trainLosses": [
          0.62913280725479126,
          0.16713269054889679,
          0.12354248017072678,
          0.102596640586853,
          0.0958492755889892,
          0.090699523687362671,
          0.0868601649999618,
          0.0860302299261093,
          0.082873545587062836,
          0.0823553800582885
        ],
        "validationLosses": [
          0.95734274387359619,
          0.31822299957275391,
          0.34026464819908142,
          0.27653488516807551,
          0.25740143656730652,
          0.269286036491394,
          0.26372304558753967,
          0.25908330082893372,
          0.2597166895866394,
          0.25973501801490778
        ],
        "latenciesInSeconds": [
          0.3398594856262207,
          0.3659665584564209,
          0.37360644340515131,
          0.35134077072143549,
          0.33703041076660151,
          0.31876277923583979,
          0.32833099365234369,
          0.35035872459411621,
          0.30800247192382813,
          0.3327946662902832
        ]
      },
      "variableStates": [
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_1"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_2"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_3"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_4"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_5"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_6"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_7"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_8"
        },
        {
          "effectiveCount": 1441,
          "lastTimestamp": "2022-04-02T00:00:00Z",
          "filledNARatio": 0,
          "firstTimestamp": "2022-04-01T00:00:00Z",
          "variable": "variable_9"
        }
      ]
    }
  }
}
{
  "required": [
    "createdTime",
    "lastUpdatedTime",
    "modelId"
  ],
  "properties": {
    "modelId": {
      "type": "string",
      "format": "uuid",
      "description": "Model identifier.",
      "example": "45aad126-aafd-11ea-b8fb-d89ef3400c5f"
    },
    "createdTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time (UTC) when the model was created.",
      "example": "2022-11-01T00:00:00Z"
    },
    "lastUpdatedTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time (UTC) when the model was last updated.",
      "example": "2022-11-01T00:00:00Z"
    },
    "modelInfo": {
      "required": [
        "dataSource",
        "endTime",
        "startTime"
      ],
      "properties": {
        "dataSource": {
          "type": "string",
          "description": "Source link to the input data to indicate an accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage based on you data schema selection. ",
          "example": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"
        },
        "dataSchema": {
          "description": "Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable.",
          "enum": [
            "OneTable",
            "MultiTable"
          ],
          "example": "OneTable",
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "DataSchema",
            "values": [
              {
                "value": "OneTable",
                "description": "OneTable means that your input data are all in one CSV file, which contains one 'timestamp' column and several variable columns. The default DataSchema is OneTable."
              },
              {
                "value": "MultiTable",
                "description": "MultiTable means that your input data are separated in multiple CSV files, in each file containing one 'timestamp' column and one 'variable' column, and the CSV file name should indicate the name of the variable. The default DataSchema is OneTable."
              }
            ]
          }
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "A required field, indicating the start time of training data, which should be date-time of ISO 8601 format.",
          "example": "2022-04-01T00:00:00Z"
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "A required field, indicating the end time of training data, which should be date-time of ISO 8601 format.",
          "example": "2022-04-02T00:00:00Z"
        },
        "displayName": {
          "type": "string",
          "description": "An optional field. The display name of the model whose maximum length is 24 characters.",
          "example": "MultiAD-Sample",
          "maxLength": 24
        },
        "slidingWindow": {
          "type": "integer",
          "description": "An optional field, indicating how many previous timestamps will be used to detect whether the timestamp is anomaly or not. ",
          "example": 200
        },
        "alignPolicy": {
          "properties": {
            "alignMode": {
              "enum": [
                "Inner",
                "Outer"
              ],
              "example": "Outer",
              "type": "string",
              "x-ms-enum": {
                "modelAsString": false,
                "name": "alignMode",
                "values": [
                  {
                    "value": "Inner"
                  },
                  {
                    "value": "Outer"
                  }
                ]
              },
              "description": "An optional field, indicating how to align different variables to the same time-range. Either Inner or Outer. "
            },
            "fillNAMethod": {
              "enum": [
                "Previous",
                "Subsequent",
                "Linear",
                "Zero",
                "Fixed"
              ],
              "example": "Linear",
              "type": "string",
              "x-ms-enum": {
                "modelAsString": true,
                "name": "fillNAMethod",
                "values": [
                  {
                    "value": "Previous"
                  },
                  {
                    "value": "Subsequent"
                  },
                  {
                    "value": "Linear"
                  },
                  {
                    "value": "Zero"
                  },
                  {
                    "value": "Fixed"
                  }
                ]
              },
              "description": "An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed."
            },
            "paddingValue": {
              "type": "number",
              "description": "An optional field. Required when fillNAMethod is Fixed."
            }
          },
          "type": "object",
          "description": "An optional field, indicating the manner to align multiple variables."
        },
        "status": {
          "description": "Model status. One of CREATED, RUNNING, READY, and FAILED.",
          "enum": [
            "CREATED",
            "RUNNING",
            "READY",
            "FAILED"
          ],
          "example": "READY",
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "modelStatus",
            "values": [
              {
                "value": "CREATED"
              },
              {
                "value": "RUNNING"
              },
              {
                "value": "READY"
              },
              {
                "value": "FAILED"
              }
            ]
          }
        },
        "errors": {
          "type": "array",
          "description": "Error messages when failed to create a model.",
          "items": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The error code."
              },
              "message": {
                "type": "string",
                "description": "The message explaining the error reported by the service."
              }
            },
            "type": "object"
          }
        },
        "diagnosticsInfo": {
          "properties": {
            "modelState": {
              "properties": {
                "epochIds": {
                  "type": "array",
                  "description": "This indicates the number of passes of the entire training dataset the algorithm has completed.",
                  "example": [
                    10,
                    20,
                    30,
                    40,
                    50,
                    60,
                    70,
                    80,
                    90,
                    100
                  ],
                  "items": {
                    "type": "integer"
                  }
                },
                "trainLosses": {
                  "type": "array",
                  "description": "List of metrics used to assess how the model fits the training data for each epoch.",
                  "example": [
                    0.62913280725479126,
                    0.16713269054889679,
                    0.12354248017072678,
                    0.102596640586853,
                    0.0958492755889892,
                    0.090699523687362671,
                    0.0868601649999618,
                    0.0860302299261093,
                    0.082873545587062836,
                    0.0823553800582885
                  ],
                  "items": {
                    "type": "number"
                  }
                },
                "validationLosses": {
                  "type": "array",
                  "description": "List of metrics used to assess how the model fits the validation set for each epoch.",
                  "example": [
                    0.95734274387359619,
                    0.31822299957275391,
                    0.34026464819908142,
                    0.27653488516807551,
                    0.25740143656730652,
                    0.269286036491394,
                    0.26372304558753967,
                    0.25908330082893372,
                    0.2597166895866394,
                    0.25973501801490778
                  ],
                  "items": {
                    "type": "number"
                  }
                },
                "latenciesInSeconds": {
                  "type": "array",
                  "description": "Latency for each epoch. ",
                  "example": [
                    0.3398594856262207,
                    0.3659665584564209,
                    0.37360644340515131,
                    0.35134077072143549,
                    0.33703041076660151,
                    0.31876277923583979,
                    0.32833099365234369,
                    0.35035872459411621,
                    0.30800247192382813,
                    0.3327946662902832
                  ],
                  "items": {
                    "type": "number"
                  }
                }
              },
              "type": "object"
            },
            "variableStates": {
              "type": "array",
              "example": [
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_1"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_2"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_3"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_4"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_5"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_6"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_7"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_8"
                },
                {
                  "effectiveCount": 1441,
                  "lastTimestamp": "2022-04-02T00:00:00Z",
                  "filledNARatio": 0,
                  "firstTimestamp": "2022-04-01T00:00:00Z",
                  "variable": "variable_9"
                }
              ],
              "items": {
                "properties": {
                  "variable": {
                    "type": "string",
                    "description": "Variable name in variable states."
                  },
                  "filledNARatio": {
                    "type": "number",
                    "description": "Proportion of missing values that need to be filled by fillNAMethod.",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "effectiveCount": {
                    "type": "integer",
                    "description": "Number of effective data points before applying fillNAMethod."
                  },
                  "firstTimestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "First valid timestamp with value of input data."
                  },
                  "lastTimestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Last valid timestamp with value of input data."
                  }
                },
                "type": "object"
              }
            }
          },
          "type": "object",
          "description": "Diagnostics information to help inspect the states of model or variable."
        }
      },
      "type": "object",
      "description": "Training result of a model including its status, errors and diagnostics information.",
      "example": {
        "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv",
        "dataSchema": "OneTable",
        "startTime": "2022-04-01T00:00:00Z",
        "endTime": "2022-04-02T00:00:00Z",
        "displayName": "MultiAD-Sample",
        "slidingWindow": 200,
        "alignPolicy": {
          "alignMode": "Outer",
          "fillNAMethod": "Linear",
          "paddingValue": 0
        },
        "status": "READY",
        "errors": [
          {
            "code": "string",
            "message": "string"
          }
        ],
        "diagnosticsInfo": {
          "modelState": {
            "epochIds": [
              10,
              20,
              30,
              40,
              50,
              60,
              70,
              80,
              90,
              100
            ],
            "trainLosses": [
              0.62913280725479126,
              0.16713269054889679,
              0.12354248017072678,
              0.102596640586853,
              0.0958492755889892,
              0.090699523687362671,
              0.0868601649999618,
              0.0860302299261093,
              0.082873545587062836,
              0.0823553800582885
            ],
            "validationLosses": [
              0.95734274387359619,
              0.31822299957275391,
              0.34026464819908142,
              0.27653488516807551,
              0.25740143656730652,
              0.269286036491394,
              0.26372304558753967,
              0.25908330082893372,
              0.2597166895866394,
              0.25973501801490778
            ],
            "latenciesInSeconds": [
              0.3398594856262207,
              0.3659665584564209,
              0.37360644340515131,
              0.35134077072143549,
              0.33703041076660151,
              0.31876277923583979,
              0.32833099365234369,
              0.35035872459411621,
              0.30800247192382813,
              0.3327946662902832
            ]
          },
          "variableStates": [
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_1"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_2"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_3"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_4"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_5"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_6"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_7"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_8"
            },
            {
              "effectiveCount": 1441,
              "lastTimestamp": "2022-04-02T00:00:00Z",
              "filledNARatio": 0,
              "firstTimestamp": "2022-04-01T00:00:00Z",
              "variable": "variable_9"
            }
          ]
        }
      }
    }
  },
  "type": "object",
  "description": "Response of getting a model."
}

Response 500

Error response.

{
  "code": "string",
  "message": "string"
}
{
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "The error code."
    },
    "message": {
      "type": "string",
      "description": "The message explaining the error reported by the service."
    }
  },
  "type": "object"
}

Code samples

@ECHO OFF

curl -v -X POST "https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models"
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Content-Type", "application/json");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "POST",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"POST"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Content-Type' => 'application/json',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('*.cognitiveservices.azure.com')
    conn.request("POST", "/anomalydetector/v1.1/multivariate/models?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('*.cognitiveservices.azure.com')
    conn.request("POST", "/anomalydetector/v1.1/multivariate/models?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://*.cognitiveservices.azure.com/anomalydetector/v1.1/multivariate/models')
uri.query = URI.encode_www_form({
})

request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body