Skip to content

Commit 1f32785

Browse files
lmazueljr-MS
authored andcommitted
Fix ApiVersion for Anomaly Detector (Azure#21215)
* 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>
1 parent 29d9c84 commit 1f32785

File tree

2 files changed

+50
-24
lines changed

2 files changed

+50
-24
lines changed

specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.1/MultivariateAnomalyDetector.json

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,19 @@
2525
}
2626
],
2727
"x-ms-parameterized-host": {
28-
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
28+
"hostTemplate": "{Endpoint}/anomalydetector",
2929
"useSchemePrefix": false,
3030
"parameters": [
3131
{
3232
"$ref": "#/parameters/Endpoint"
33-
},
34-
{
35-
"$ref": "#/parameters/ApiVersion"
3633
}
3734
]
3835
},
3936
"schemes": [
4037
"https"
4138
],
4239
"paths": {
43-
"/multivariate/detect-batch/{resultId}": {
40+
"/{ApiVersion}/multivariate/detect-batch/{resultId}": {
4441
"get": {
4542
"responses": {
4643
"200": {
@@ -64,8 +61,11 @@
6461
},
6562
"summary": "Get Multivariate Anomaly Detection Result",
6663
"description": "For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api.",
67-
"operationId": "GetBatchDetectionResult",
64+
"operationId": "GetMultivariateBatchDetectionResult",
6865
"parameters": [
66+
{
67+
"$ref": "#/parameters/ApiVersion"
68+
},
6969
{
7070
"name": "resultId",
7171
"in": "path",
@@ -82,7 +82,7 @@
8282
}
8383
}
8484
},
85-
"/multivariate/models": {
85+
"/{ApiVersion}/multivariate/models": {
8686
"post": {
8787
"responses": {
8888
"201": {
@@ -112,8 +112,11 @@
112112
},
113113
"summary": "Train a Multivariate Anomaly Detection Model",
114114
"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.",
115-
"operationId": "CreateMultivariateModel",
115+
"operationId": "CreateAndTrainMultivariateModel",
116116
"parameters": [
117+
{
118+
"$ref": "#/parameters/ApiVersion"
119+
},
117120
{
118121
"name": "body",
119122
"required": true,
@@ -153,8 +156,11 @@
153156
},
154157
"summary": "List Multivariate Models",
155158
"description": "List models of a resource.",
156-
"operationId": "ListMultivariateModel",
159+
"operationId": "ListMultivariateModels",
157160
"parameters": [
161+
{
162+
"$ref": "#/parameters/ApiVersion"
163+
},
158164
{
159165
"type": "integer",
160166
"default": 0,
@@ -182,7 +188,7 @@
182188
}
183189
}
184190
},
185-
"/multivariate/models/{modelId}": {
191+
"/{ApiVersion}/multivariate/models/{modelId}": {
186192
"delete": {
187193
"responses": {
188194
"204": {
@@ -205,6 +211,9 @@
205211
"description": "Delete an existing multivariate model according to the modelId",
206212
"operationId": "DeleteMultivariateModel",
207213
"parameters": [
214+
{
215+
"$ref": "#/parameters/ApiVersion"
216+
},
208217
{
209218
"name": "modelId",
210219
"in": "path",
@@ -245,6 +254,9 @@
245254
"description": "Get detailed information of multivariate model, including the training status and variables used in the model.",
246255
"operationId": "GetMultivariateModel",
247256
"parameters": [
257+
{
258+
"$ref": "#/parameters/ApiVersion"
259+
},
248260
{
249261
"name": "modelId",
250262
"in": "path",
@@ -261,7 +273,7 @@
261273
}
262274
}
263275
},
264-
"/multivariate/models/{modelId}:detect-batch": {
276+
"/{ApiVersion}/multivariate/models/{modelId}:detect-batch": {
265277
"post": {
266278
"responses": {
267279
"202": {
@@ -295,8 +307,11 @@
295307
},
296308
"summary": "Detect Multivariate Anomaly",
297309
"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.",
298-
"operationId": "BatchDetectAnomaly",
310+
"operationId": "DetectMultivariateBatchAnomaly",
299311
"parameters": [
312+
{
313+
"$ref": "#/parameters/ApiVersion"
314+
},
300315
{
301316
"name": "modelId",
302317
"in": "path",
@@ -323,7 +338,7 @@
323338
"x-ms-long-running-operation": true
324339
}
325340
},
326-
"/multivariate/models/{modelId}:detect-last": {
341+
"/{ApiVersion}/multivariate/models/{modelId}:detect-last": {
327342
"post": {
328343
"responses": {
329344
"200": {
@@ -347,8 +362,11 @@
347362
},
348363
"summary": "Detect anomalies in the last point of the request body",
349364
"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.",
350-
"operationId": "LastDetectAnomaly",
365+
"operationId": "DetectMultivariateLastAnomaly",
351366
"parameters": [
367+
{
368+
"$ref": "#/parameters/ApiVersion"
369+
},
352370
{
353371
"name": "modelId",
354372
"in": "path",
@@ -1211,6 +1229,7 @@
12111229
"name": "ApiVersion",
12121230
"description": "Anomaly Detector API version (for example, v1.1).",
12131231
"x-ms-parameter-location": "client",
1232+
"x-ms-api-version": true,
12141233
"required": true,
12151234
"type": "string",
12161235
"in": "path"

specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.1/UnivariateAnomalyDetector.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@
1919
}
2020
],
2121
"x-ms-parameterized-host": {
22-
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
22+
"hostTemplate": "{Endpoint}/anomalydetector",
2323
"useSchemePrefix": false,
2424
"parameters": [
2525
{
2626
"$ref": "#/parameters/Endpoint"
27-
},
28-
{
29-
"$ref": "#/parameters/ApiVersion"
3027
}
3128
]
3229
},
3330
"paths": {
34-
"/timeseries/entire/detect": {
31+
"/{ApiVersion}/timeseries/entire/detect": {
3532
"post": {
3633
"summary": "Detect anomalies for the entire series in batch.",
3734
"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.",
38-
"operationId": "DetectEntireSeries",
35+
"operationId": "DetectUnivariateEntireSeries",
3936
"parameters": [
37+
{
38+
"$ref": "#/parameters/ApiVersion"
39+
},
4040
{
4141
"name": "body",
4242
"in": "body",
@@ -80,12 +80,15 @@
8080
}
8181
}
8282
},
83-
"/timeseries/last/detect": {
83+
"/{ApiVersion}/timeseries/last/detect": {
8484
"post": {
8585
"summary": "Detect anomaly status of the latest point in time series.",
8686
"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.",
87-
"operationId": "DetectLastPoint",
87+
"operationId": "DetectUnivariateLastPoint",
8888
"parameters": [
89+
{
90+
"$ref": "#/parameters/ApiVersion"
91+
},
8992
{
9093
"name": "body",
9194
"in": "body",
@@ -129,12 +132,15 @@
129132
}
130133
}
131134
},
132-
"/timeseries/changepoint/detect": {
135+
"/{ApiVersion}/timeseries/changepoint/detect": {
133136
"post": {
134137
"summary": "Detect change point for the entire series",
135138
"description": "Evaluate change point score of every series point",
136-
"operationId": "DetectChangePoint",
139+
"operationId": "DetectUnivariateChangePoint",
137140
"parameters": [
141+
{
142+
"$ref": "#/parameters/ApiVersion"
143+
},
138144
{
139145
"name": "body",
140146
"in": "body",
@@ -586,6 +592,7 @@
586592
"name": "ApiVersion",
587593
"description": "Anomaly Detector API version (for example, v1.1).",
588594
"x-ms-parameter-location": "client",
595+
"x-ms-api-version": true,
589596
"required": true,
590597
"type": "string",
591598
"in": "path"

0 commit comments

Comments
 (0)