Skip to content

Commit f3ed963

Browse files
authored
[Anomaly Detector] Rename operations and fix path casing (#10572)
* Rename operations and fix path casing * Ad x-ms-enum details * add changepoint to custom-words * Remove enum renames while architects discuss * Add x-ms-enum * Rename Request. Point and Granularity * Update error name * Formatting
1 parent cd627d8 commit f3ed963

File tree

2 files changed

+45
-19
lines changed

2 files changed

+45
-19
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ certificatesdelete
275275
Certificatethumbprint
276276
certverify
277277
chainer
278+
changepoint
278279
changestate
279280
CHECKACCESS
280281
checkmark

specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
"post": {
3232
"summary": "Detect anomalies for the entire series in batch.",
3333
"description": "This operation generates a model using 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.",
34-
"operationId": "EntireDetect",
34+
"operationId": "DetectEntireSeries",
3535
"parameters": [
3636
{
3737
"name": "body",
3838
"in": "body",
3939
"description": "Time series points and period if needed. Advanced model parameters can also be set in the request.",
4040
"required": true,
4141
"schema": {
42-
"$ref": "#/definitions/Request"
42+
"$ref": "#/definitions/DetectRequest"
4343
}
4444
}
4545
],
@@ -59,7 +59,7 @@
5959
"default": {
6060
"description": "Error response.",
6161
"schema": {
62-
"$ref": "#/definitions/APIError"
62+
"$ref": "#/definitions/AnomalyDetectorError"
6363
}
6464
}
6565
},
@@ -74,15 +74,15 @@
7474
"post": {
7575
"summary": "Detect anomaly status of the latest point in time series.",
7676
"description": "This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.",
77-
"operationId": "LastDetect",
77+
"operationId": "DetectLastPoint",
7878
"parameters": [
7979
{
8080
"name": "body",
8181
"in": "body",
8282
"description": "Time series points and period if needed. Advanced model parameters can also be set in the request.",
8383
"required": true,
8484
"schema": {
85-
"$ref": "#/definitions/Request"
85+
"$ref": "#/definitions/DetectRequest"
8686
}
8787
}
8888
],
@@ -102,7 +102,7 @@
102102
"default": {
103103
"description": "Error response.",
104104
"schema": {
105-
"$ref": "#/definitions/APIError"
105+
"$ref": "#/definitions/AnomalyDetectorError"
106106
}
107107
}
108108
},
@@ -113,11 +113,11 @@
113113
}
114114
}
115115
},
116-
"/timeseries/changePoint/detect": {
116+
"/timeseries/changepoint/detect": {
117117
"post": {
118118
"summary": "Detect change point for the entire series",
119119
"description": "Evaluate change point score of every series point",
120-
"operationId": "ChangePointDetect",
120+
"operationId": "DetectChangePoint",
121121
"parameters": [
122122
{
123123
"name": "body",
@@ -145,7 +145,7 @@
145145
"default": {
146146
"description": "Error response.",
147147
"schema": {
148-
"$ref": "#/definitions/APIError"
148+
"$ref": "#/definitions/AnomalyDetectorError"
149149
}
150150
}
151151
},
@@ -158,7 +158,7 @@
158158
}
159159
},
160160
"definitions": {
161-
"APIError": {
161+
"AnomalyDetectorError": {
162162
"type": "object",
163163
"description": "Error information returned by the API.",
164164
"properties": {
@@ -186,13 +186,38 @@
186186
}
187187
}
188188
},
189-
"Granularity": {
189+
"TimeGranularity": {
190190
"type": "string",
191191
"description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid.",
192192
"x-nullable": false,
193193
"x-ms-enum": {
194-
"name": "Granularity",
195-
"modelAsString": false
194+
"name": "TimeGranularity",
195+
"modelAsString": false,
196+
"values": [
197+
{
198+
"value": "yearly"
199+
},
200+
{
201+
"value": "monthly"
202+
},
203+
{
204+
"value": "weekly"
205+
},
206+
{
207+
"value": "daily"
208+
},
209+
{
210+
"value": "hourly"
211+
},
212+
{
213+
"name": "perMinute",
214+
"value": "minutely"
215+
},
216+
{
217+
"name": "perSecond",
218+
"value": "secondly"
219+
}
220+
]
196221
},
197222
"enum": [
198223
"yearly",
@@ -210,7 +235,7 @@
210235
"x-nullable": false,
211236
"description": "Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {\"granularity\":\"minutely\", \"customInterval\":5}."
212237
},
213-
"Request": {
238+
"DetectRequest": {
214239
"type": "object",
215240
"required": [
216241
"granularity",
@@ -221,11 +246,11 @@
221246
"type": "array",
222247
"description": "Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned.",
223248
"items": {
224-
"$ref": "#/definitions/Point"
249+
"$ref": "#/definitions/TimeSeriesPoint"
225250
}
226251
},
227252
"granularity": {
228-
"$ref": "#/definitions/Granularity"
253+
"$ref": "#/definitions/TimeGranularity"
229254
},
230255
"customInterval": {
231256
"description": "Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {\"granularity\":\"minutely\", \"customInterval\":5}.",
@@ -248,7 +273,7 @@
248273
}
249274
}
250275
},
251-
"Point": {
276+
"TimeSeriesPoint": {
252277
"type": "object",
253278
"required": [
254279
"timestamp",
@@ -400,11 +425,11 @@
400425
"type": "array",
401426
"description": "Time series data points. Points should be sorted by timestamp in ascending order to match the change point detection result.",
402427
"items": {
403-
"$ref": "#/definitions/Point"
428+
"$ref": "#/definitions/TimeSeriesPoint"
404429
}
405430
},
406431
"granularity": {
407-
"$ref": "#/definitions/Granularity",
432+
"$ref": "#/definitions/TimeGranularity",
408433
"description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid."
409434
},
410435
"customInterval": {

0 commit comments

Comments
 (0)