{ "swagger": "2.0", "info": { "title": "Anomaly Detector", "version": "v1.1", "description": "The Anomaly Detector API detects anomalies automatically in time series data.\nIt supports both a stateless detection mode and a\nstateful detection mode. In stateless mode, there are three functionalities. Entire\nDetect is for detecting the whole series, with the model trained by the time series.\nLast Detect is for detecting the last point, with the model trained by points before.\nChangePoint Detect is for detecting trend changes in the time series. In stateful\nmode, the user can store time series. The stored time series will be used for\ndetection anomalies. In this mode, the user can still use the preceding three\nfunctionalities by only giving a time range without preparing time series on the\nclient side. Besides the preceding three functionalities, the stateful model\nprovides group-based detection and labeling services. By using the labeling\nservice, the user can provide labels for each detection result. These labels will be\nused for retuning or regenerating detection models. Inconsistency detection is\na kind of group-based detection that finds inconsistencies in\na set of time series. By using the anomaly detector service, business customers can\ndiscover incidents and establish a logic flow for root cause analysis.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}", "useSchemePrefix": false, "parameters": [ { "name": "Endpoint", "in": "path", "description": "Supported Azure Cognitive Services endpoints (protocol and host name, such as\nhttps://westus2.api.cognitive.microsoft.com).", "required": true, "type": "string", "format": "uri", "x-ms-skip-url-encoding": true }, { "name": "ApiVersion", "in": "path", "description": "Api Version", "required": true, "type": "string", "enum": [ "v1.1" ], "x-ms-enum": { "name": "APIVersion", "modelAsString": true, "values": [ { "name": "v1_1", "value": "v1.1" } ] } } ] }, "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "AnomalyDetectorApiKeyAuth": [] } ], "securityDefinitions": { "AnomalyDetectorApiKeyAuth": { "type": "apiKey", "description": "The secret key for your Azure Cognitive Services subscription.", "name": "Ocp-Apim-Subscription-Key", "in": "header" } }, "tags": [], "paths": { "/multivariate/detect-batch/{resultId}": { "get": { "operationId": "Multivariate_GetMultivariateBatchDetectionResult", "summary": "Get Multivariate Anomaly Detection Result", "description": "For asynchronous inference, get a multivariate anomaly detection result based on the\nresultId value that the BatchDetectAnomaly API returns.", "parameters": [ { "name": "resultId", "in": "path", "description": "ID of a batch detection result.", "required": true, "type": "string", "format": "uuid" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Multivariate.MultivariateDetectionResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Get multivariate batch detection result": { "$ref": "./examples/GetResult.json" } } } }, "/multivariate/models": { "get": { "operationId": "Multivariate_ListMultivariateModels", "summary": "List Multivariate Models", "description": "List models of a resource.", "parameters": [ { "$ref": "#/parameters/Azure.Core.SkipQueryParameter" }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Multivariate.ModelList" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "List multivariate models": { "$ref": "./examples/ListModel.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink", "itemName": "models" } }, "post": { "operationId": "Multivariate_TrainMultivariateModel", "summary": "Train a Multivariate Anomaly Detection Model", "description": "Create and train a multivariate anomaly detection model. The request must\ninclude a source parameter to indicate an Azure Blob\nStorage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point to an Azure Blob\nStorage folder that contains multiple CSV files, where each CSV file has\ntwo columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file that has all the variables and a\ntime stamp column.\nThe model object will be created and returned in the response, but the\ntraining process happens asynchronously. To check the training status, call\nGetMultivariateModel with the modelId value and check the status field in the\nmodelInfo object.", "parameters": [ { "name": "modelInfo", "in": "body", "description": "Model information.", "required": true, "schema": { "$ref": "#/definitions/Multivariate.ModelInfo" } } ], "responses": { "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/Multivariate.AnomalyDetectionModel" }, "headers": { "location": { "type": "string", "description": "Location and ID of the model." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Create and train multivariate model": { "$ref": "./examples/TrainModel.json" } } } }, "/multivariate/models/{modelId}": { "get": { "operationId": "Multivariate_GetMultivariateModel", "summary": "Get Multivariate Model", "description": "Get detailed information about the multivariate model, including the training status\nand variables used in the model.", "parameters": [ { "name": "modelId", "in": "path", "description": "Model identifier.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Multivariate.AnomalyDetectionModel" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Get a multivariate model": { "$ref": "./examples/GetModel.json" } } }, "delete": { "operationId": "Multivariate_DeleteMultivariateModel", "summary": "Delete Multivariate Model", "description": "Delete an existing multivariate model according to the modelId value.", "parameters": [ { "name": "modelId", "in": "path", "description": "Model identifier.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Delete multivariate model": { "$ref": "./examples/DeleteModel.json" } } } }, "/multivariate/models/{modelId}:detect-batch": { "post": { "operationId": "Multivariate_DetectMultivariateBatchAnomaly", "summary": "Detect Multivariate Anomaly", "description": "Submit a multivariate anomaly detection task with the modelId value of a trained model\nand inference data. The input schema should be the same with the training\nrequest. The request will finish asynchronously and return a resultId value to\nquery the detection result. The request should be a source link to indicate an\nexternally accessible Azure Storage URI that either points to an Azure Blob\nStorage folder or points to a CSV file in Azure Blob Storage.", "parameters": [ { "name": "modelId", "in": "path", "description": "Model identifier.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request of multivariate anomaly detection.", "required": true, "schema": { "$ref": "#/definitions/Multivariate.MultivariateBatchDetectionOptions" } } ], "responses": { "202": { "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/Multivariate.MultivariateDetectionResult" }, "headers": { "Operation-Id": { "type": "string", "description": "ID of the detection result." }, "Operation-Location": { "type": "string", "description": "Location of the detection result." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Detect multivariate batch anomaly": { "$ref": "./examples/DetectAnomaly.json" } } } }, "/multivariate/models/{modelId}:detect-last": { "post": { "operationId": "Multivariate_DetectMultivariateLastAnomaly", "summary": "Detect anomalies in the last point of the request body", "description": "Submit a multivariate anomaly detection task with the modelId value of a trained model\nand inference data. The inference data should be put into the request body in\nJSON format. The request will finish synchronously and return the detection\nimmediately in the response body.", "parameters": [ { "name": "modelId", "in": "path", "description": "Model identifier.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request of the last detection.", "required": true, "schema": { "$ref": "#/definitions/Multivariate.MultivariateLastDetectionOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Multivariate.MultivariateLastDetectionResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Multivariate.ResponseError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Detect multivariate last anomaly": { "$ref": "./examples/LastDetectAnomaly.json" } } } }, "/timeseries/changepoint/detect": { "post": { "operationId": "Univariate_DetectUnivariateChangePoint", "summary": "Detect change point for the entire series", "description": "Evaluate the change point score of every series point.", "parameters": [ { "name": "options", "in": "body", "description": "Method of univariate anomaly detection.", "required": true, "schema": { "$ref": "#/definitions/Univariate.UnivariateChangePointDetectionOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Univariate.UnivariateChangePointDetectionResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Univariate.AnomalyDetectorError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Univariate detection of a change point": { "$ref": "./examples/ChangePointDetect.json" } } } }, "/timeseries/entire/detect": { "post": { "operationId": "Univariate_DetectUnivariateEntireSeries", "summary": "Detect anomalies for the entire series in batch.", "description": "This operation generates a model with an entire series. Each point is detected\nwith the same model. With this method, points before and after a certain point\nare used to determine whether it's an anomaly. The entire detection can give the\nuser an overall status of the time series.", "parameters": [ { "name": "options", "in": "body", "description": "Method of univariate anomaly detection.", "required": true, "schema": { "$ref": "#/definitions/Univariate.UnivariateDetectionOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Univariate.UnivariateEntireDetectionResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Univariate.AnomalyDetectorError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Univariate detect entire series": { "$ref": "./examples/EntireDetect.json" } } } }, "/timeseries/last/detect": { "post": { "operationId": "Univariate_DetectUnivariateLastPoint", "summary": "Detect anomaly status of the latest point in time series.", "description": "This operation generates a model by using the points that you sent in to the API\nand based on all data to determine whether the last point is anomalous.", "parameters": [ { "name": "options", "in": "body", "description": "Method of univariate anomaly detection.", "required": true, "schema": { "$ref": "#/definitions/Univariate.UnivariateDetectionOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Univariate.UnivariateLastDetectionResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Univariate.AnomalyDetectorError" }, "headers": { "x-ms-error-code": { "type": "string", "description": "Error code." } } } }, "x-ms-examples": { "Detect univariate last point": { "$ref": "./examples/LastDetect.json" } } } } }, "definitions": { "Azure.Core.uuid": { "type": "string", "format": "uuid", "description": "Universally Unique Identifier" }, "Multivariate.AlignMode": { "type": "string", "enum": [ "Inner", "Outer" ], "x-ms-enum": { "name": "AlignMode", "modelAsString": true } }, "Multivariate.AlignPolicy": { "type": "object", "description": "Manner of aligning multiple variables.", "properties": { "alignMode": { "$ref": "#/definitions/Multivariate.AlignMode", "description": "Field that indicates how to align different variables to the same\ntime range." }, "fillNAMethod": { "$ref": "#/definitions/Multivariate.FillNAMethod", "description": "Field that indicates how missing values will be filled." }, "paddingValue": { "type": "number", "format": "float", "description": "Field that's required when fillNAMethod is Fixed." } } }, "Multivariate.AnomalyDetectionModel": { "type": "object", "description": "Response of getting a model.", "properties": { "modelId": { "$ref": "#/definitions/Azure.Core.uuid", "description": "Model identifier." }, "createdTime": { "type": "string", "format": "date-time", "description": "Date and time (UTC) when the model was created." }, "lastUpdatedTime": { "type": "string", "format": "date-time", "description": "Date and time (UTC) when the model was last updated." }, "modelInfo": { "$ref": "#/definitions/Multivariate.ModelInfo", "description": "Training result of a model, including its status, errors, and diagnostics\ninformation." } }, "required": [ "modelId", "createdTime", "lastUpdatedTime" ] }, "Multivariate.AnomalyInterpretation": { "type": "object", "description": "Interpretation of the anomalous time stamp.", "properties": { "variable": { "type": "string", "description": "Variable." }, "contributionScore": { "type": "number", "format": "float", "description": "This score shows the percentage that contributes to the anomalous time stamp. It's a\nnumber between 0 and 1." }, "correlationChanges": { "$ref": "#/definitions/Multivariate.CorrelationChanges", "description": "Correlation changes among the anomalous variables." } } }, "Multivariate.AnomalyState": { "type": "object", "description": "Anomaly status and information.", "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "Time stamp for this anomaly." }, "value": { "$ref": "#/definitions/Multivariate.AnomalyValue", "description": "Detailed value of this anomalous time stamp." }, "errors": { "type": "array", "description": "Error message for the current time stamp.", "items": { "$ref": "#/definitions/Multivariate.ErrorResponse" } } }, "required": [ "timestamp" ] }, "Multivariate.AnomalyValue": { "type": "object", "description": "Detailed information of the anomalous time stamp.", "properties": { "isAnomaly": { "type": "boolean", "description": "True if an anomaly is detected at the current time stamp." }, "severity": { "type": "number", "format": "float", "description": "Indicates the significance of the anomaly. The higher the severity, the more\nsignificant the anomaly is.", "minimum": 0, "maximum": 1 }, "score": { "type": "number", "format": "float", "description": "Raw anomaly score of severity, to help indicate the degree of abnormality.", "minimum": 0, "maximum": 2 }, "interpretation": { "type": "array", "description": "Interpretation of this anomalous time stamp.", "items": { "$ref": "#/definitions/Multivariate.AnomalyInterpretation" } } }, "required": [ "isAnomaly", "severity", "score" ] }, "Multivariate.CorrelationChanges": { "type": "object", "description": "Correlation changes among the anomalous variables.", "properties": { "changedVariables": { "type": "array", "description": "Correlated variables that have correlation changes under an anomaly.", "items": { "type": "string" } } } }, "Multivariate.DataSchema": { "type": "string", "description": "Data schema of the input data source. The default is OneTable.", "enum": [ "OneTable", "MultiTable" ], "x-ms-enum": { "name": "DataSchema", "modelAsString": true, "values": [ { "name": "OneTable", "value": "OneTable", "description": "OneTable means that your input data is in one CSV file, which contains one time stamp column and several variable columns. The default DataSchema value is OneTable." }, { "name": "MultiTable", "value": "MultiTable", "description": "MultiTable means that your input data is separated in multiple CSV files. Each file contains one time stamp column and one variable column, and the CSV file name should indicate the name of the variable. The default DataSchema value is OneTable." } ] } }, "Multivariate.DiagnosticsInfo": { "type": "object", "description": "Diagnostics information to help inspect the states of a model or variable.", "properties": { "modelState": { "$ref": "#/definitions/Multivariate.ModelState", "description": "Model status." }, "variableStates": { "type": "array", "description": "Variable status.", "items": { "$ref": "#/definitions/Multivariate.VariableState" } } } }, "Multivariate.ErrorResponse": { "type": "object", "description": "Error information that the API returned.", "properties": { "code": { "type": "string", "description": "Error code." }, "message": { "type": "string", "description": "Message that explains the error that the service reported." } }, "required": [ "code", "message" ] }, "Multivariate.FillNAMethod": { "type": "string", "description": "Field that indicates how missing values will be filled.", "enum": [ "Previous", "Subsequent", "Linear", "Zero", "Fixed" ], "x-ms-enum": { "name": "FillNAMethod", "modelAsString": true } }, "Multivariate.ModelInfo": { "type": "object", "description": "Training result of a model, including its status, errors, and diagnostics\ninformation.", "properties": { "dataSource": { "type": "string", "format": "uri", "description": "Source link to the input data to indicate an accessible Azure Storage URI.\nIt either points to an Azure Blob Storage folder or points to a CSV file in\nAzure Blob Storage, based on your data schema selection." }, "dataSchema": { "$ref": "#/definitions/Multivariate.DataSchema", "description": "Data schema of the input data source. The default\nis OneTable." }, "startTime": { "type": "string", "format": "date-time", "description": "Start date/time of training data, which should be\nin ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "End date/time of training data, which should be\nin ISO 8601 format." }, "displayName": { "type": "string", "description": "Display name of the model. Maximum length is 24\ncharacters.", "maxLength": 24 }, "slidingWindow": { "type": "integer", "format": "int32", "description": "Number of previous time stamps that will be used to\ndetect whether the time stamp is an anomaly or not." }, "alignPolicy": { "$ref": "#/definitions/Multivariate.AlignPolicy", "description": "Manner of aligning multiple variables." }, "status": { "$ref": "#/definitions/Multivariate.ModelStatus", "description": "Model status.", "readOnly": true }, "errors": { "type": "array", "description": "Error messages after failure to create a model.", "items": { "$ref": "#/definitions/Multivariate.ErrorResponse" }, "readOnly": true }, "diagnosticsInfo": { "$ref": "#/definitions/Multivariate.DiagnosticsInfo", "description": "Diagnostics information to help inspect the states of a model or variable.", "readOnly": true } }, "required": [ "dataSource", "startTime", "endTime" ] }, "Multivariate.ModelList": { "type": "object", "description": "Response of listing models.", "properties": { "models": { "type": "array", "description": "List of models.", "items": { "$ref": "#/definitions/Multivariate.AnomalyDetectionModel" } }, "currentCount": { "type": "integer", "format": "int32", "description": "Number of trained multivariate models." }, "maxCount": { "type": "integer", "format": "int32", "description": "Maximum number of models that can be trained for this Anomaly Detector resource." }, "nextLink": { "type": "string", "description": "Link to fetch more models." } }, "required": [ "models", "currentCount", "maxCount" ] }, "Multivariate.ModelState": { "type": "object", "description": "Model status.", "properties": { "epochIds": { "type": "array", "description": "Number of passes of the entire training dataset that the\nalgorithm has completed.", "items": { "type": "integer", "format": "int32" } }, "trainLosses": { "type": "array", "description": "List of metrics used to assess how the model fits the training data for each\nepoch.", "items": { "type": "number", "format": "float" } }, "validationLosses": { "type": "array", "description": "List of metrics used to assess how the model fits the validation set for each\nepoch.", "items": { "type": "number", "format": "float" } }, "latenciesInSeconds": { "type": "array", "description": "Latency for each epoch.", "items": { "type": "number", "format": "float" } } } }, "Multivariate.ModelStatus": { "type": "string", "enum": [ "CREATED", "RUNNING", "READY", "FAILED" ], "x-ms-enum": { "name": "ModelStatus", "modelAsString": true, "values": [ { "name": "Created", "value": "CREATED", "description": "The model has been created. Training has been scheduled but not yet started." }, { "name": "Running", "value": "RUNNING", "description": "The model is being trained." }, { "name": "Ready", "value": "READY", "description": "The model has been trained and is ready to be used for anomaly detection." }, { "name": "Failed", "value": "FAILED", "description": "The model training failed." } ] } }, "Multivariate.MultivariateBatchDetectionOptions": { "type": "object", "description": "Detection request for batch inference. This is an asynchronous inference that\nwill need another API to get detection results.", "properties": { "dataSource": { "type": "string", "format": "uri", "description": "Source link to the input data to indicate an accessible Azure Storage URI.\nIt either points to an Azure Blob Storage folder or points to a CSV file in\nAzure Blob Storage, based on your data schema selection. The data schema should\nbe exactly the same as those used in the training phase. The input data must\ncontain at least slidingWindow entries preceding the start time of the data\nto be detected." }, "topContributorCount": { "type": "integer", "format": "int32", "description": "Number of top contributed variables for one anomalous time stamp in the response.", "default": 10 }, "startTime": { "type": "string", "format": "date-time", "description": "Start date/time of data for detection, which should\nbe in ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "End date/time of data for detection, which should\nbe in ISO 8601 format." } }, "required": [ "dataSource", "startTime", "endTime" ] }, "Multivariate.MultivariateBatchDetectionResultSummary": { "type": "object", "description": "Multivariate anomaly detection status.", "properties": { "status": { "$ref": "#/definitions/Multivariate.MultivariateBatchDetectionStatus", "description": "Status of detection results." }, "errors": { "type": "array", "description": "Error message when detection fails.", "items": { "$ref": "#/definitions/Multivariate.ErrorResponse" } }, "variableStates": { "type": "array", "description": "Variable status.", "items": { "$ref": "#/definitions/Multivariate.VariableState" } }, "setupInfo": { "$ref": "#/definitions/Multivariate.MultivariateBatchDetectionOptions", "description": "Detection request for batch inference. This is an asynchronous inference that\nwill need another API to get detection results." } }, "required": [ "status", "setupInfo" ] }, "Multivariate.MultivariateBatchDetectionStatus": { "type": "string", "enum": [ "CREATED", "RUNNING", "READY", "FAILED" ], "x-ms-enum": { "name": "MultivariateBatchDetectionStatus", "modelAsString": true, "values": [ { "name": "Created", "value": "CREATED" }, { "name": "Running", "value": "RUNNING" }, { "name": "Ready", "value": "READY" }, { "name": "Failed", "value": "FAILED" } ] } }, "Multivariate.MultivariateDetectionResult": { "type": "object", "description": "Detection results for the resultId value.", "properties": { "resultId": { "$ref": "#/definitions/Azure.Core.uuid", "description": "Result identifier that's used to fetch the results of an inference call." }, "summary": { "$ref": "#/definitions/Multivariate.MultivariateBatchDetectionResultSummary", "description": "Multivariate anomaly detection status." }, "results": { "type": "array", "description": "Detection result for each time stamp.", "items": { "$ref": "#/definitions/Multivariate.AnomalyState" } } }, "required": [ "resultId", "summary", "results" ] }, "Multivariate.MultivariateLastDetectionOptions": { "type": "object", "description": "Request of the last detection.", "properties": { "variables": { "type": "array", "description": "Contains the inference data, including the name, time stamps (ISO 8601), and\nvalues of variables.", "items": { "$ref": "#/definitions/Multivariate.VariableValues" } }, "topContributorCount": { "type": "integer", "format": "int32", "description": "Number of top contributed\nvariables for one anomalous time stamp in the response. The default is\n10.", "default": 10 } }, "required": [ "variables" ] }, "Multivariate.MultivariateLastDetectionResult": { "type": "object", "description": "Results of the last detection.", "properties": { "variableStates": { "type": "array", "description": "Variable status.", "items": { "$ref": "#/definitions/Multivariate.VariableState" } }, "results": { "type": "array", "description": "Anomaly status and information.", "items": { "$ref": "#/definitions/Multivariate.AnomalyState" } } } }, "Multivariate.ResponseError": { "type": "object", "description": "Error response.", "properties": { "code": { "type": "string", "description": "Error code." }, "message": { "type": "string", "description": "Message that explains the error that the service reported." } }, "required": [ "code", "message" ] }, "Multivariate.VariableState": { "type": "object", "description": "Variable status.", "properties": { "variable": { "type": "string", "description": "Variable name in variable states." }, "filledNARatio": { "type": "number", "format": "float", "description": "Proportion of missing values that need to be filled by fillNAMethod.", "minimum": 0, "maximum": 1 }, "effectiveCount": { "type": "integer", "format": "int32", "description": "Number of effective data points before fillNAMethod is applied." }, "firstTimestamp": { "type": "string", "format": "date-time", "description": "First valid time stamp with a value of input data." }, "lastTimestamp": { "type": "string", "format": "date-time", "description": "Last valid time stamp with a value of input data." } } }, "Multivariate.VariableValues": { "type": "object", "description": "Variable values.", "properties": { "variable": { "type": "string", "description": "Variable name of the last detection request." }, "timestamps": { "type": "array", "description": "Time stamps of the last detection request.", "items": { "type": "string" } }, "values": { "type": "array", "description": "Values of variables.", "items": { "type": "number", "format": "float" } } }, "required": [ "variable", "timestamps", "values" ] }, "Univariate.AnomalyDetectorError": { "type": "object", "description": "Error information that the API returned.", "properties": { "code": { "$ref": "#/definitions/Univariate.AnomalyDetectorErrorCodes", "description": "Error code." }, "message": { "type": "string", "description": "Message that explains the error that the service reported." } }, "required": [ "code", "message" ] }, "Univariate.AnomalyDetectorErrorCodes": { "type": "string", "enum": [ "InvalidCustomInterval", "BadArgument", "InvalidGranularity", "InvalidPeriod", "InvalidModelArgument", "InvalidSeries", "InvalidJsonFormat", "RequiredGranularity", "RequiredSeries", "InvalidImputeMode", "InvalidImputeFixedValue" ], "x-ms-enum": { "name": "AnomalyDetectorErrorCodes", "modelAsString": true } }, "Univariate.ImputeMode": { "type": "string", "enum": [ "auto", "previous", "linear", "fixed", "zero", "notFill" ], "x-ms-enum": { "name": "ImputeMode", "modelAsString": true, "values": [ { "name": "Auto", "value": "auto" }, { "name": "Previous", "value": "previous" }, { "name": "Linear", "value": "linear" }, { "name": "Fixed", "value": "fixed" }, { "name": "Zero", "value": "zero" }, { "name": "NotFill", "value": "notFill" } ] } }, "Univariate.TimeGranularity": { "type": "string", "enum": [ "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly", "microsecond", "none" ], "x-ms-enum": { "name": "TimeGranularity", "modelAsString": true, "values": [ { "name": "Yearly", "value": "yearly" }, { "name": "Monthly", "value": "monthly" }, { "name": "Weekly", "value": "weekly" }, { "name": "Daily", "value": "daily" }, { "name": "Hourly", "value": "hourly" }, { "name": "PerMinute", "value": "minutely" }, { "name": "PerSecond", "value": "secondly" }, { "name": "Microsecond", "value": "microsecond" }, { "name": "None", "value": "none" } ] } }, "Univariate.TimeSeriesPoint": { "type": "object", "description": "Definition of input time series points.", "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "Argument that indicates the time stamp of a data point (ISO8601 format)." }, "value": { "type": "number", "format": "float", "description": "Measurement of that point." } }, "required": [ "value" ] }, "Univariate.UnivariateChangePointDetectionOptions": { "type": "object", "description": "Request of change point detection.", "properties": { "series": { "type": "array", "description": "Time series data points. Points should be sorted by time stamp in ascending\norder to match the change point detection result.", "items": { "$ref": "#/definitions/Univariate.TimeSeriesPoint" } }, "granularity": { "$ref": "#/definitions/Univariate.TimeGranularity", "description": "Granularity is used to verify whether the input series is valid." }, "customInterval": { "type": "integer", "format": "int32", "description": "A custom interval is used to set a nonstandard time interval. For example, if the\nseries is 5 minutes, the request can be set as {\"granularity\":\"minutely\",\n\"customInterval\":5}." }, "period": { "type": "integer", "format": "int32", "description": "Argument that indicates the periodic value of a time series. If the value is null or\nnot present, the API will determine the period automatically." }, "stableTrendWindow": { "type": "integer", "format": "int32", "description": "Argument that indicates an advanced model parameter. A default stableTrendWindow value will\nbe used in detection." }, "threshold": { "type": "number", "format": "float", "description": "Argument that indicates an advanced model parameter between 0.0 and 1.0. The lower the\nvalue is, the larger the trend error is, which means less change point will\nbe accepted." } }, "required": [ "series", "granularity" ] }, "Univariate.UnivariateChangePointDetectionResult": { "type": "object", "description": "Response of change point detection.", "properties": { "period": { "type": "integer", "format": "int32", "description": "Frequency extracted from the series. Zero means no recurrent pattern has been\nfound.", "readOnly": true }, "isChangePoint": { "type": "array", "description": "Change point properties for each input point. True means\nan anomaly (either negative or positive) has been detected. The index of the\narray is consistent with the input series.", "items": { "type": "boolean" } }, "confidenceScores": { "type": "array", "description": "Change point confidence of each point.", "items": { "type": "number", "format": "float" } } } }, "Univariate.UnivariateDetectionOptions": { "type": "object", "description": "Request of the entire or last anomaly detection.", "properties": { "series": { "type": "array", "description": "Time series data points. Points should be sorted by time stamp in ascending\norder to match the anomaly detection result. If the data is not sorted\ncorrectly or there's a duplicated time stamp, the API won't work. In such\na case, an error message is returned.", "items": { "$ref": "#/definitions/Univariate.TimeSeriesPoint" } }, "granularity": { "$ref": "#/definitions/Univariate.TimeGranularity", "description": "Argument that indicates time granularity. If granularity is not present, the value\nis none by default. If granularity is none, the time stamp property in the time\nseries point can be absent." }, "customInterval": { "type": "integer", "format": "int32", "description": "A custom interval is used to set a nonstandard time interval. For example, if the\nseries is 5 minutes, the request can be set as {\"granularity\":\"minutely\",\n\"customInterval\":5}." }, "period": { "type": "integer", "format": "int32", "description": "Argument that indicates the periodic value of a time series. If the value is null or\nis not present, the API determines the period automatically." }, "maxAnomalyRatio": { "type": "number", "format": "float", "description": "Argument that indicates an advanced model parameter. It's the maximum anomaly ratio in a time series." }, "sensitivity": { "type": "integer", "format": "int32", "description": "Argument that indicates an advanced model parameter between 0 and 99. The lower the value\nis, the larger the margin value is, which means fewer anomalies will be\naccepted." }, "imputeMode": { "$ref": "#/definitions/Univariate.ImputeMode", "description": "Specifies how to deal with missing values in the input series. It's used\nwhen granularity is not \"none\"." }, "imputeFixedValue": { "type": "number", "format": "float", "description": "Specifies the value to fill. It's used when granularity is not \"none\"\nand imputeMode is \"fixed\"." } }, "required": [ "series" ] }, "Univariate.UnivariateEntireDetectionResult": { "type": "object", "description": "Response of the entire anomaly detection.", "properties": { "period": { "type": "integer", "format": "int32", "description": "Frequency extracted from the series. Zero means no recurrent pattern has been\nfound." }, "expectedValues": { "type": "array", "description": "Expected value for each input point. The index of the\narray is consistent with the input series.", "items": { "type": "number", "format": "float" } }, "upperMargins": { "type": "array", "description": "Upper margin of each input point. UpperMargin is used to\ncalculate upperBoundary, which is equal to expectedValue + (100 -\nmarginScale)*upperMargin. Anomalies in the response can be filtered by\nupperBoundary and lowerBoundary. Adjusting the marginScale value can help filter less\nsignificant anomalies on the client side. The index of the array is\nconsistent with the input series.", "items": { "type": "number", "format": "float" } }, "lowerMargins": { "type": "array", "description": "Lower margin of each input point. LowerMargin is used to\ncalculate lowerBoundary, which is equal to expectedValue - (100 -\nmarginScale)*lowerMargin. Points between the boundary can be marked as normal\nones on the client side. The index of the array is consistent with the input\nseries.", "items": { "type": "number", "format": "float" } }, "isAnomaly": { "type": "array", "description": "Anomaly properties for each input point. True means an\nanomaly (either negative or positive) has been detected. The index of the array\nis consistent with the input series.", "items": { "type": "boolean" } }, "isNegativeAnomaly": { "type": "array", "description": "Anomaly status in a negative direction for each input\npoint. True means a negative anomaly has been detected. A negative anomaly\nmeans the point is detected as an anomaly and its real value is smaller than\nthe expected one. The index of the array is consistent with the input series.", "items": { "type": "boolean" } }, "isPositiveAnomaly": { "type": "array", "description": "Anomaly status in a positive direction for each input\npoint. True means a positive anomaly has been detected. A positive anomaly\nmeans the point is detected as an anomaly and its real value is larger than the\nexpected one. The index of the array is consistent with the input series.", "items": { "type": "boolean" } }, "severity": { "type": "array", "description": "Severity score for each input point. The larger the value is, the more\nsevere the anomaly is. For normal points, the severity is always 0.", "items": { "type": "number", "format": "float" } } }, "required": [ "period", "expectedValues", "upperMargins", "lowerMargins", "isAnomaly", "isNegativeAnomaly", "isPositiveAnomaly" ] }, "Univariate.UnivariateLastDetectionResult": { "type": "object", "description": "Response of the last anomaly detection.", "properties": { "period": { "type": "integer", "format": "int32", "description": "Frequency extracted from the series. Zero means no recurrent pattern has been\nfound." }, "suggestedWindow": { "type": "integer", "format": "int32", "description": "Suggested input series points needed for detecting the latest point." }, "expectedValue": { "type": "number", "format": "float", "description": "Expected value of the latest point." }, "upperMargin": { "type": "number", "format": "float", "description": "Upper margin of the latest point. UpperMargin is used to calculate\nupperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin.\nIf the value of latest point is between upperBoundary and lowerBoundary, it\nshould be treated as a normal value. Adjusting the marginScale value enables the anomaly\nstatus of the latest point to be changed." }, "lowerMargin": { "type": "number", "format": "float", "description": "Lower margin of the latest point. LowerMargin is used to calculate\nlowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin." }, "isAnomaly": { "type": "boolean", "description": "Anomaly status of the latest point. True means the latest point is an anomaly,\neither in the negative direction or in the positive direction." }, "isNegativeAnomaly": { "type": "boolean", "description": "Anomaly status of the latest point in a negative direction. True means the latest\npoint is an anomaly and its real value is smaller than the expected one." }, "isPositiveAnomaly": { "type": "boolean", "description": "Anomaly status of the latest point in a positive direction. True means the latest\npoint is an anomaly and its real value is larger than the expected one." }, "severity": { "type": "number", "format": "float", "description": "Severity score for the last input point. The larger the value is, the more\nsevere the anomaly is. For normal points, the severity is always 0." } }, "required": [ "period", "suggestedWindow", "expectedValue", "upperMargin", "lowerMargin", "isAnomaly", "isNegativeAnomaly", "isPositiveAnomaly" ] } }, "parameters": { "Azure.Core.SkipQueryParameter": { "name": "skip", "in": "query", "description": "The number of result items to skip.", "required": false, "type": "integer", "format": "int32", "default": 0, "x-ms-parameter-location": "method" }, "Azure.Core.TopQueryParameter": { "name": "top", "in": "query", "description": "The number of result items to return.", "required": false, "type": "integer", "format": "int32", "x-ms-parameter-location": "method" } } }