Skip to content

Commit

Permalink
AD APIVersion Swagger (#21298)
Browse files Browse the repository at this point in the history
* AD APIVersion Swagger

* Don't forget the rename
  • Loading branch information
lmazuel authored Oct 27, 2022
1 parent cf0b8f6 commit d1d295c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@
}
],
"x-ms-parameterized-host": {
"hostTemplate": "{Endpoint}/anomalydetector",
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
},
{
"$ref": "#/parameters/ApiVersion"
}
]
},
"schemes": [
"https"
],
"paths": {
"/{ApiVersion}/multivariate/detect-batch/{resultId}": {
"/multivariate/detect-batch/{resultId}": {
"get": {
"responses": {
"200": {
Expand All @@ -63,9 +66,6 @@
"description": "For asynchronous inference, get multivariate anomaly detection result based on resultId returned by the BatchDetectAnomaly api.",
"operationId": "GetMultivariateBatchDetectionResult",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "resultId",
"in": "path",
Expand All @@ -82,7 +82,7 @@
}
}
},
"/{ApiVersion}/multivariate/models": {
"/multivariate/models": {
"post": {
"responses": {
"201": {
Expand Down Expand Up @@ -114,9 +114,6 @@
"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": "CreateAndTrainMultivariateModel",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"required": true,
Expand Down Expand Up @@ -158,9 +155,6 @@
"description": "List models of a resource.",
"operationId": "ListMultivariateModels",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"type": "integer",
"default": 0,
Expand Down Expand Up @@ -188,7 +182,7 @@
}
}
},
"/{ApiVersion}/multivariate/models/{modelId}": {
"/multivariate/models/{modelId}": {
"delete": {
"responses": {
"204": {
Expand All @@ -211,9 +205,6 @@
"description": "Delete an existing multivariate model according to the modelId",
"operationId": "DeleteMultivariateModel",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand Down Expand Up @@ -254,9 +245,6 @@
"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 @@ -273,7 +261,7 @@
}
}
},
"/{ApiVersion}/multivariate/models/{modelId}:detect-batch": {
"/multivariate/models/{modelId}:detect-batch": {
"post": {
"responses": {
"202": {
Expand Down Expand Up @@ -309,9 +297,6 @@
"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": "DetectMultivariateBatchAnomaly",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand All @@ -338,7 +323,7 @@
"x-ms-long-running-operation": true
}
},
"/{ApiVersion}/multivariate/models/{modelId}:detect-last": {
"/multivariate/models/{modelId}:detect-last": {
"post": {
"responses": {
"200": {
Expand All @@ -364,9 +349,6 @@
"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": "DetectMultivariateLastAnomaly",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "modelId",
"in": "path",
Expand Down Expand Up @@ -1235,4 +1217,4 @@
"in": "path"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
}
],
"x-ms-parameterized-host": {
"hostTemplate": "{Endpoint}/anomalydetector",
"hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
},
{
"$ref": "#/parameters/ApiVersion"
}
]
},
"paths": {
"/{ApiVersion}/timeseries/entire/detect": {
"/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": "DetectUnivariateEntireSeries",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -80,15 +80,12 @@
}
}
},
"/{ApiVersion}/timeseries/last/detect": {
"/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": "DetectUnivariateLastPoint",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -132,15 +129,12 @@
}
}
},
"/{ApiVersion}/timeseries/changepoint/detect": {
"/timeseries/changepoint/detect": {
"post": {
"summary": "Detect change point for the entire series",
"description": "Evaluate change point score of every series point",
"operationId": "DetectUnivariateChangePoint",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"name": "body",
"in": "body",
Expand Down Expand Up @@ -598,4 +592,4 @@
"in": "path"
}
}
}
}

0 comments on commit d1d295c

Please sign in to comment.