{
  "openapi": "3.0.1",
  "info": {
    "title": "Anomaly Detection API",
    "description": "This is a generated connector from [Siemens Analytics Anomaly Detection API](https://developer.mindsphere.io/apis/analytics-anomalydetection/api-anomalydetection-overview.html) OpenAPI Specification.\nThe Anomaly Detection Service aims to automatically detect unexpected behaviour of processes and assets using time series data and provides API to train model and use it for anomaly detection. In the Interactive mode Analytic Model Management service is used as model storage. Model expiration date is set to 14 days.",
    "version": "3.4.0",
    "x-visibility": "external",
    "x-ballerina-init-description": "The connector initialization requires setting the API credentials. \nCreate a [Siemens MindSphere](https://siemens.mindsphere.io/en) account and obtain tokens by following [this guide](https://developer.mindsphere.io/concepts/concept-roles-scopes.html#iot-file-service). For accessing this service you need to have the respective roles listed in [Analytics roles and scopes](https://developer.mindsphere.io/concepts/concept-roles-scopes.html#analytics-services)\n",
    "x-ballerina-display": {
      "label": "Siemens Analytics Anomaly Detection",
      "iconPath": "icon.png"
    }
  },
  "tags": [
    {
      "name": "Anomaly Detection",
      "description": "Anyomaly detection with data provided in request"
    },
    {
      "name": "Anomaly Detection Direct",
      "description": "Anomaly detection with data directly fetched from IoT Time Series Service"
    },
    {
      "name": "Batch. Models",
      "description": "Asynchronous model training with data fetched from IoT Time Series Service"
    },
    {
      "name": "Batch. Anomaly Detection",
      "description": "Asynchronous model execution with data fetched from IoT Time Series Service"
    },
    {
      "name": "Deprecated Operations"
    }
  ],
  "paths": {
    "/detectAnomaliesJobs": {
      "post": {
        "tags": [
          "Batch. Anomaly Detection"
        ],
        "summary": "Anomaly Detection batch reasoning",
        "operationId": "detectAnomaliesbatchreasoning",
        "description": "Performs long running reasoning (anomaly detection) for given timeseries data.",
        "requestBody": {
          "description": "Request data to launch reasoning job.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitReasoningRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReasoningJobInfo"
                }
              }
            }
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ],
        "x-codegen-request-body-name": "SubmitReasoningRequest"
      }
    },
    "/detectAnomaliesJobs/{id}": {
      "get": {
        "tags": [
          "Batch. Anomaly Detection"
        ],
        "summary": "Get job status.",
        "operationId": "getJobStatus",
        "description": "Returns current status for specified jod.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the job to get status for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReasoningJobInfo"
                }
              }
            }
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ]
      }
    },
    "/detectAnomaliesJobs/{id}/cancel": {
      "post": {
        "tags": [
          "Batch. Anomaly Detection"
        ],
        "summary": "Cancel job.",
        "operationId": "canceljob",
        "description": "Cancels specified job.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the job to get status for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {}
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ]
      }
    },
    "/trainModelJobs": {
      "post": {
        "tags": [
          "Batch. Models"
        ],
        "summary": "Anomaly Detection batch model training",
        "operationId": "detectAnomalyBatchModelTraining",
        "description": "Performs long running model training for given timeseries data. The number of timeseries items to process is limited by 1000000, this parameter can be changed in the future without notice.",
        "requestBody": {
          "description": "Request data to launch training job",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitTrainingRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingJobInfo"
                }
              }
            }
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ],
        "x-codegen-request-body-name": "SubmitTrainingRequest"
      }
    },
    "/trainModelJobs/{id}": {
      "get": {
        "tags": [
          "Batch. Models"
        ],
        "summary": "Get job status.",
        "operationId": "getJobStatusTrainModelJobs",
        "description": "Returns current status for specified jod.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the job to get status for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingJobInfo"
                }
              }
            }
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ]
      }
    },
    "/trainModelJobs/{id}/cancel": {
      "post": {
        "tags": [
          "Batch. Models"
        ],
        "summary": "Cancel job.",
        "operationId": "cancelJobTrainModelJob",
        "description": "Cancels specified job.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the job to get status for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {}
          },
          "default": {
            "description": "Other error with any status code and response body format.",
            "content": {}
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.adb.u"
            ]
          }
        ]
      }
    },
    "/models": {
      "post": {
        "tags": [
          "Anomaly Detection"
        ],
        "summary": "Train model",
        "operationId": "trainModel",
        "description": "Creates new model based on given timeseries data. Analytic Model Management service is used to store created model.",
        "parameters": [
          {
            "name": "epsilon",
            "in": "query",
            "description": "Threshold for the distance to check if point belongs to cluster.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "minPointsPerCluster",
            "in": "query",
            "description": "Minimum cluster size. Positive. Minimum is 2.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "integer"
            }
          },
          {
            "name": "distanceMeasureAlgorithm",
            "in": "query",
            "description": "Name of the distance measure algorithm.",
            "schema": {
              "type": "string",
              "default": "EUCLIDEAN",
              "enum": [
                "EUCLIDEAN",
                "MANHATTAN",
                "CHEBYSHEV"
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model",
            "schema": {
              "type": "string",
              "default": "model"
            }
          }
        ],
        "requestBody": {
          "description": "An array containing the time series items. Data to train a model. Data must contain 10 variables at max. Each timeseries item must have equal number of variables.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Timeseries"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "400": {
            "description": "Wrong arguments exception",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ],
        "x-codegen-request-body-name": "ioTTimeSeriesItems"
      }
    },
    "/detectanomalies": {
      "post": {
        "tags": [
          "Anomaly Detection"
        ],
        "summary": "Anomaly detection",
        "operationId": "detectAnomalies",
        "description": "Performs anomaly detection for given timeseries data against specified model.",
        "parameters": [
          {
            "name": "modelID",
            "in": "query",
            "description": "ID of the model to use.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "An array containing the time series items. Data to performs detection on. Data must contain 10 variables at max. Each timeseries item must have equal number of variables. Variables must be the same as the ones used to train the model (the same number of variables and the same names).",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Timeseries"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Anomaly"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Wrong arguments exception",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ],
        "x-codegen-request-body-name": "ioTTimeSeriesItems"
      }
    },
    "/modelsDirect": {
      "post": {
        "tags": [
          "Anomaly Detection Direct"
        ],
        "summary": "Train model in direct integration with IoT time series",
        "operationId": "trainModelDirectIntegration",
        "description": "Creates new model based on given asset details. Analytic Model Management service is used to store created model.",
        "parameters": [
          {
            "name": "epsilon",
            "in": "query",
            "description": "Threshold for the distance to check if point belongs to cluster.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "minPointsPerCluster",
            "in": "query",
            "description": "Minimum cluster size. Positive. Minimum is 2.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "integer"
            }
          },
          {
            "name": "distanceMeasureAlgorithm",
            "in": "query",
            "description": "Name of the distance measure algorithm.",
            "schema": {
              "type": "string",
              "default": "EUCLIDEAN",
              "enum": [
                "EUCLIDEAN",
                "MANHATTAN",
                "CHEBYSHEV"
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model",
            "schema": {
              "type": "string",
              "default": "model"
            }
          },
          {
            "name": "assetId",
            "in": "query",
            "description": "unique identifier of the asset (entity)",
            "required": true,
            "schema": {
              "maxLength": 32,
              "minLength": 32,
              "pattern": "[a-f0-9]{32}",
              "type": "string"
            }
          },
          {
            "name": "aspectName",
            "in": "query",
            "description": "Name of the aspect (property set).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Beginning of the time range to be retrieved (exclusive).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the time range to be retrieved (exclusive).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "400": {
            "description": "Wrong parameters. Client errors faced while fetching IoT Time Series data are returned as 400 error with message:\n\n*\\<STATUS\\>: IoT time series service returns \\<STATUS\\> status with message: \\<ERROR_MESSAGE\\>*\n\nwhere \\<STATUS\\> is replaced with the response status code and \\<ERROR_MESSAGE\\> with the error message returned by IoT Time Series Service.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ]
      }
    },
    "/detectanomaliesDirect": {
      "post": {
        "tags": [
          "Anomaly Detection Direct"
        ],
        "summary": "Anomaly detection in direct integration with IoT time series",
        "operationId": "detectAnomaliesDirectIntegration",
        "description": "Performs anomaly detection for given asset details against specified model.",
        "parameters": [
          {
            "name": "modelID",
            "in": "query",
            "description": "ID of the model to use.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assetId",
            "in": "query",
            "description": "unique identifier of the asset (entity)",
            "required": true,
            "schema": {
              "maxLength": 32,
              "minLength": 32,
              "pattern": "[a-f0-9]{32}",
              "type": "string"
            }
          },
          {
            "name": "aspectName",
            "in": "query",
            "description": "Name of the aspect (property set).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Beginning of the time range to be retrieved (exclusive).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the time range to be retrieved (exclusive).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Anomaly"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Wrong parameters. Client errors faced while fetching IoT Time Series data are returned as 400 error with message:\n\n*\\<STATUS\\>: IoT time series service returns \\<STATUS\\> status with message: \\<ERROR_MESSAGE\\>*\n\nwhere \\<STATUS\\> is replaced with the response status code and \\<ERROR_MESSAGE\\> with the error message returned by IoT Time Series Service.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ]
      }
    },
    "/models/{id}": {
      "get": {
        "tags": [
          "Deprecated Operations"
        ],
        "summary": "Get model",
        "operationId": "getModel",
        "description": "DEPRECATED: This operation is deprecated! Use Analytic Model Management service instead. Returns existing model.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the model to get. Model ID corresponds ID from Analytic Model Management service.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "400": {
            "description": "Wrong arguments exception",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Deprecated Operations"
        ],
        "summary": "Delete model",
        "operationId": "deleteModel",
        "description": "DEPRECATED: This operation is deprecated! Use Analytic Model Management service instead. Deletes existing model.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the model to delete. Model ID corresponds ID from Analytic Model Management service.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content",
            "content": {}
          },
          "400": {
            "description": "Wrong arguments exception",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WrongArgumentException"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundException"
                }
              }
            }
          },
          "500": {
            "description": "Exception during job processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProcessingException"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "anomalydetection": [
              "as.ad.u"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "SubmitReasoningRequest": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "description": "Name of the entity in IoT Timeseries service to read data for.",
            "example": "entityName"
          },
          "aspect": {
            "type": "string",
            "description": "Name of the property set in IoT Timeseries service to read data for.",
            "example": "propertySetName"
          },
          "variables": {
            "type": "string",
            "description": "List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken. Also this list must be the same as the one used to train the model, in other words training and reasoning must be performed over the same variables.",
            "example": "variable_1,variable_2,variable_3"
          },
          "from": {
            "type": "string",
            "description": "Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "to": {
            "type": "string",
            "description": "End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "modelFolderId": {
            "type": "string",
            "description": "ID of the folder in Data Exchange Service to get model from. Must not be empty.",
            "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
          },
          "resultFolderId": {
            "type": "string",
            "description": "ID of the folder in Data Exchange Service to save results to. Must not be empty.",
            "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
          }
        }
      },
      "SubmitTrainingRequest": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "description": "Name of the entity in IoT Timeseries service to read data for.",
            "example": "entityName"
          },
          "aspect": {
            "type": "string",
            "description": "Name of the property set in IoT Timeseries service to read data for.",
            "example": "propertySetName"
          },
          "variables": {
            "type": "string",
            "description": "List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken. List must contain up to 10 variables.",
            "example": "variable_1,variable_2,variable_3"
          },
          "from": {
            "type": "string",
            "description": "Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "to": {
            "type": "string",
            "description": "End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "epsilon": {
            "type": "number",
            "description": "Anomaly Detection threshold for the distance to check if point belongs to cluster.",
            "example": 0.23
          },
          "minPointsPerCluster": {
            "type": "number",
            "description": "Anomaly detection minimum cluster size. Positive. Minimum is 2.",
            "example": 6
          },
          "distanceMeasureAlgorithm": {
            "type": "string",
            "description": "Name of the Anomaly Detection distance measure algorithm.",
            "example": "EUCLIDEAN",
            "enum": [
              "EUCLIDEAN",
              "MANHATTAN",
              "CHEBYSHEV"
            ]
          },
          "resultFolderId": {
            "type": "string",
            "description": "ID of the folder in Data Exchange Service to save results to. Must not be empty.",
            "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
          }
        }
      },
      "ReasoningJobInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "unique identifier of the job",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "job status",
            "enum": [
              "SUBMITTED",
              "RUNNING",
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "timestamp": {
            "type": "string",
            "description": "job creation time",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "parameters": {
            "type": "object",
            "properties": {
              "asset": {
                "type": "string",
                "description": "Name of the entity in IoT Timeseries service to read data for.",
                "example": "entityName"
              },
              "aspect": {
                "type": "string",
                "description": "Name of the property set in IoT Timeseries service to read data for.",
                "example": "propertySetName"
              },
              "variables": {
                "type": "string",
                "description": "List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken.",
                "example": "variable_1,variable_2,variable_3"
              },
              "from": {
                "type": "string",
                "description": "Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
                "format": "date-time",
                "example": "2018-04-01T00:00:00.000Z"
              },
              "to": {
                "type": "string",
                "description": "End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
                "format": "date-time",
                "example": "2018-04-01T00:00:00.000Z"
              },
              "modelFolderId": {
                "type": "string",
                "description": "ID of the folder in Data Exchange Service to get model from. Must not be empty.",
                "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
              },
              "resultFolderId": {
                "type": "string",
                "description": "ID of the folder in Data Exchange Service to save results to. Must not be empty.",
                "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
              }
            }
          }
        }
      },
      "TrainingJobInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "unique identifier of the job",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "job status",
            "enum": [
              "SUBMITTED",
              "RUNNING",
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "timestamp": {
            "type": "string",
            "description": "job creation time",
            "format": "date-time",
            "example": "2018-04-01T00:00:00.000Z"
          },
          "parameters": {
            "type": "object",
            "properties": {
              "asset": {
                "type": "string",
                "description": "Name of the entity in IoT Timeseries service to read data for.",
                "example": "entityName"
              },
              "aspect": {
                "type": "string",
                "description": "Name of the property set in IoT Timeseries service to read data for.",
                "example": "propertySetName"
              },
              "variables": {
                "type": "string",
                "description": "List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken.",
                "example": "variable_1,variable_2,variable_3"
              },
              "from": {
                "type": "string",
                "description": "Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
                "format": "date-time",
                "example": "2018-04-01T00:00:00.000Z"
              },
              "to": {
                "type": "string",
                "description": "End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.",
                "format": "date-time",
                "example": "2018-04-01T00:00:00.000Z"
              },
              "epsilon": {
                "type": "number",
                "description": "Anomaly Detection threshold for the distance to check if point belongs to cluster.",
                "example": 0.23
              },
              "minPointsPerCluster": {
                "type": "number",
                "description": "Anomaly detection minimum cluster size. Positive. Minimum is 2.",
                "example": 6
              },
              "distanceMeasureAlgorithm": {
                "type": "string",
                "description": "Name of the Anomaly Detection distance measure algorithm.",
                "example": "EUCLIDEAN",
                "enum": [
                  "EUCLIDEAN",
                  "MANHATTAN",
                  "CHEBYSHEV"
                ]
              },
              "resultFolderId": {
                "type": "string",
                "description": "ID of the folder in Data Exchange Service to save results to. Must not be empty.",
                "example": "48612165-f2d6-444b-b3ed-33c368f3c0a8"
              }
            }
          }
        }
      },
      "Timeseries": {
        "required": [
          "_time"
        ],
        "type": "object",
        "properties": {
          "_time": {
            "type": "string",
            "description": "time"
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Time series aspect (property set) variable with value.\n"
        },
        "example": {
          "_time": "2017-10-01T12:00:00.001Z",
          "pressure": 4
        }
      },
      "Anomaly": {
        "type": "object",
        "properties": {
          "anomalyExtent": {
            "type": "number",
            "description": "Extent of anomaly at this point",
            "example": 0.15
          },
          "_time": {
            "type": "string",
            "description": "time",
            "example": "2017-10-01T12:00:00.001Z"
          }
        }
      },
      "Model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the created Model.",
            "format": "uuid",
            "example": "6f6f3d93-df18-495f-8de4-fa29cb2e5835"
          },
          "creationTimestamp": {
            "type": "string",
            "description": "Timestamp model was created at.",
            "example": "2017-10-01T12:00:00.001Z"
          },
          "variables": {
            "type": "string",
            "description": "Variables used to train the model (variables from input json).",
            "example": "variableName1,variableName2"
          },
          "name": {
            "type": "string",
            "description": "Human-friendly name of the model, not an empty string. Maximum length is 255 characters. Only ASCII characters.",
            "example": "Test Model #1"
          }
        }
      },
      "WrongArgumentException": {
        "type": "object",
        "properties": {
          "logref": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "example": "Wrong arguments exception."
          }
        }
      },
      "NotFoundException": {
        "type": "object",
        "properties": {
          "logref": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "example": "Not found."
          }
        }
      },
      "JobProcessingException": {
        "type": "object",
        "properties": {
          "logref": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "example": "Exception during job processing."
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "logref": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "anomalydetection": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://oauth.simple.api/authorization",
            "tokenUrl": "https://oauth.simple.api/token",
            "scopes": {
              "as.ad.u": "use interactive mode",
              "as.adb.u": "use batch mode"
            }
          }
        }
      }
    }
  }
}