Skip to content

Commit

Permalink
Fix ApiVersion for Anomaly Detector (Azure#21215)
Browse files Browse the repository at this point in the history
* Fix ApiVersion for Anomaly Detector

* Update MultivariateAnomalyDetector.json

Change operationId

* Update operationId in Univariate Anomaly Detection

Co-authored-by: jr-MS <81400625+jr-MS@users.noreply.github.com>
  • Loading branch information
lmazuel and jr-MS authored Oct 21, 2022
1 parent f738601 commit 120cd06
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@
}
],
"x-ms-parameterized-host": {
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
"hostTemplate": "{Endpoint}/anomalydetector",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
},
{
"$ref": "#/parameters/ApiVersion"
}
]
},
"schemes": [
"https"
],
"paths": {
"/multivariate/detect-batch/{resultId}": {
"/{ApiVersion}/multivariate/detect-batch/{resultId}": {
"get": {
"responses": {
"200": {
Expand All @@ -64,8 +61,11 @@
},
"summary": "Get Multivariate Anomaly Detection Result",
"description": "For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api.",
"operationId": "GetBatchDetectionResult",
"operationId": "GetMultivariateBatchDetectionResult",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "resultId",
"in": "path",
Expand All @@ -82,7 +82,7 @@
}
}
},
"/multivariate/models": {
"/{ApiVersion}/multivariate/models": {
"post": {
"responses": {
"201": {
Expand Down Expand Up @@ -112,8 +112,11 @@
},
"summary": "Train a Multivariate Anomaly Detection Model",
"description": "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.",
"operationId": "CreateMultivariateModel",
"operationId": "CreateAndTrainMultivariateModel",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"required": true,
Expand Down Expand Up @@ -153,8 +156,11 @@
},
"summary": "List Multivariate Models",
"description": "List models of a resource.",
"operationId": "ListMultivariateModel",
"operationId": "ListMultivariateModels",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"type": "integer",
"default": 0,
Expand Down Expand Up @@ -182,7 +188,7 @@
}
}
},
"/multivariate/models/{modelId}": {
"/{ApiVersion}/multivariate/models/{modelId}": {
"delete": {
"responses": {
"204": {
Expand All @@ -205,6 +211,9 @@
"description": "Delete an existing multivariate model according to the modelId",
"operationId": "DeleteMultivariateModel",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand Down Expand Up @@ -245,6 +254,9 @@
"description": "Get detailed information of multivariate model, including the training status and variables used in the model.",
"operationId": "GetMultivariateModel",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand All @@ -261,7 +273,7 @@
}
}
},
"/multivariate/models/{modelId}:detect-batch": {
"/{ApiVersion}/multivariate/models/{modelId}:detect-batch": {
"post": {
"responses": {
"202": {
Expand Down Expand Up @@ -295,8 +307,11 @@
},
"summary": "Detect Multivariate Anomaly",
"description": "Submit multivariate anomaly detection task with the modelId of trained model and inference data, the input schema should be the same with the training request. The request will complete asynchronously and return a resultId to query the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri, either pointed to an Azure blob storage folder, or pointed to a CSV file in Azure blob storage.",
"operationId": "BatchDetectAnomaly",
"operationId": "DetectMultivariateBatchAnomaly",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand All @@ -323,7 +338,7 @@
"x-ms-long-running-operation": true
}
},
"/multivariate/models/{modelId}:detect-last": {
"/{ApiVersion}/multivariate/models/{modelId}:detect-last": {
"post": {
"responses": {
"200": {
Expand All @@ -347,8 +362,11 @@
},
"summary": "Detect anomalies in the last point of the request body",
"description": "Submit multivariate anomaly detection task with the modelId of trained model and inference data, and the inference data should be put into request body in a JSON format. The request will complete synchronously and return the detection immediately in the response body.",
"operationId": "LastDetectAnomaly",
"operationId": "DetectMultivariateLastAnomaly",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand Down Expand Up @@ -1211,6 +1229,7 @@
"name": "ApiVersion",
"description": "Anomaly Detector API version (for example, v1.1).",
"x-ms-parameter-location": "client",
"x-ms-api-version": true,
"required": true,
"type": "string",
"in": "path"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
}
],
"x-ms-parameterized-host": {
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
"hostTemplate": "{Endpoint}/anomalydetector",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
},
{
"$ref": "#/parameters/ApiVersion"
}
]
},
"paths": {
"/timeseries/entire/detect": {
"/{ApiVersion}/timeseries/entire/detect": {
"post": {
"summary": "Detect anomalies for the entire series in batch.",
"description": "This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.",
"operationId": "DetectEntireSeries",
"operationId": "DetectUnivariateEntireSeries",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -80,12 +80,15 @@
}
}
},
"/timeseries/last/detect": {
"/{ApiVersion}/timeseries/last/detect": {
"post": {
"summary": "Detect anomaly status of the latest point in time series.",
"description": "This operation generates a model using the points that you sent into the API, and based on all data to determine whether the last point is anomalous.",
"operationId": "DetectLastPoint",
"operationId": "DetectUnivariateLastPoint",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -129,12 +132,15 @@
}
}
},
"/timeseries/changepoint/detect": {
"/{ApiVersion}/timeseries/changepoint/detect": {
"post": {
"summary": "Detect change point for the entire series",
"description": "Evaluate change point score of every series point",
"operationId": "DetectChangePoint",
"operationId": "DetectUnivariateChangePoint",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -586,6 +592,7 @@
"name": "ApiVersion",
"description": "Anomaly Detector API version (for example, v1.1).",
"x-ms-parameter-location": "client",
"x-ms-api-version": true,
"required": true,
"type": "string",
"in": "path"
Expand Down

0 comments on commit 120cd06

Please sign in to comment.