swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Timeseries API schemes: - https tags: - name: Timeseries paths: /timeseries/changepoint/detect: post: operationId: microsoftAzureUnivariateDetectunivariatechangepoint summary: Microsoft Azure Detect Change Point For The Entire Series description: Evaluate the change point score of every series point. parameters: - name: options in: body description: Method of univariate anomaly detection. required: true schema: $ref: '#/definitions/Univariate.UnivariateChangePointDetectionOptions' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/Univariate.UnivariateChangePointDetectionResult' default: description: An unexpected error response. schema: $ref: '#/definitions/Univariate.AnomalyDetectorError' headers: x-ms-error-code: type: string description: Error code. x-ms-examples: Univariate detection of a change point: $ref: ./examples/ChangePointDetect.json tags: - Timeseries /timeseries/entire/detect: post: operationId: microsoftAzureUnivariateDetectunivariateentireseries summary: Microsoft Azure 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's an anomaly. The entire detection can give the
user an overall status of the time series. parameters: - name: options in: body description: Method of univariate anomaly detection. required: true schema: $ref: '#/definitions/Univariate.UnivariateDetectionOptions' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/Univariate.UnivariateEntireDetectionResult' default: description: An unexpected error response. schema: $ref: '#/definitions/Univariate.AnomalyDetectorError' headers: x-ms-error-code: type: string description: Error code. x-ms-examples: Univariate detect entire series: $ref: ./examples/EntireDetect.json tags: - Timeseries /timeseries/last/detect: post: operationId: microsoftAzureUnivariateDetectunivariatelastpoint summary: Microsoft Azure Detect Anomaly Status Of The Latest Point In Time Series description: This operation generates a model by using the points that you sent in to the API
and based on all data to determine whether the last point is anomalous. parameters: - name: options in: body description: Method of univariate anomaly detection. required: true schema: $ref: '#/definitions/Univariate.UnivariateDetectionOptions' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/Univariate.UnivariateLastDetectionResult' default: description: An unexpected error response. schema: $ref: '#/definitions/Univariate.AnomalyDetectorError' headers: x-ms-error-code: type: string description: Error code. x-ms-examples: Detect univariate last point: $ref: ./examples/LastDetect.json tags: - Timeseries definitions: Univariate.TimeGranularity: type: string enum: - yearly - monthly - weekly - daily - hourly - minutely - secondly - microsecond - none x-ms-enum: name: TimeGranularity modelAsString: true values: - name: Yearly value: yearly - name: Monthly value: monthly - name: Weekly value: weekly - name: Daily value: daily - name: Hourly value: hourly - name: PerMinute value: minutely - name: PerSecond value: secondly - name: Microsecond value: microsecond - name: None value: none Univariate.UnivariateDetectionOptions: type: object description: Request of the entire or last anomaly detection. properties: series: type: array description: 'Time series data points. Points should be sorted by time stamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there''s a duplicated time stamp, the API won''t work. In such a case, an error message is returned.' items: $ref: '#/definitions/Univariate.TimeSeriesPoint' x-ms-identifiers: [] granularity: $ref: '#/definitions/Univariate.TimeGranularity' description: 'Argument that indicates time granularity. If granularity is not present, the value is none by default. If granularity is none, the time stamp property in the time series point can be absent.' customInterval: type: integer format: int32 description: 'A custom interval is used to set a nonstandard time interval. For example, if the series is 5 minutes, the request can be set as {"granularity":"minutely", "customInterval":5}.' period: type: integer format: int32 description: 'Argument that indicates the periodic value of a time series. If the value is null or is not present, the API determines the period automatically.' maxAnomalyRatio: type: number format: float description: Argument that indicates an advanced model parameter. It's the maximum anomaly ratio in a time series. sensitivity: type: integer format: int32 description: 'Argument that indicates an advanced model parameter between 0 and 99. The lower the value is, the larger the margin value is, which means fewer anomalies will be accepted.' imputeMode: $ref: '#/definitions/Univariate.ImputeMode' description: 'Specifies how to deal with missing values in the input series. It''s used when granularity is not "none".' imputeFixedValue: type: number format: float description: 'Specifies the value to fill. It''s used when granularity is not "none" and imputeMode is "fixed".' required: - series Univariate.UnivariateChangePointDetectionOptions: type: object description: Request of change point detection. properties: series: type: array description: 'Time series data points. Points should be sorted by time stamp in ascending order to match the change point detection result.' items: $ref: '#/definitions/Univariate.TimeSeriesPoint' x-ms-identifiers: [] granularity: $ref: '#/definitions/Univariate.TimeGranularity' description: Granularity is used to verify whether the input series is valid. customInterval: type: integer format: int32 description: 'A custom interval is used to set a nonstandard time interval. For example, if the series is 5 minutes, the request can be set as {"granularity":"minutely", "customInterval":5}.' period: type: integer format: int32 description: 'Argument that indicates the periodic value of a time series. If the value is null or not present, the API will determine the period automatically.' stableTrendWindow: type: integer format: int32 description: 'Argument that indicates an advanced model parameter. A default stableTrendWindow value will be used in detection.' threshold: type: number format: float description: 'Argument that indicates an advanced model parameter between 0.0 and 1.0. The lower the value is, the larger the trend error is, which means less change point will be accepted.' required: - series - granularity Univariate.UnivariateLastDetectionResult: type: object description: Response of the last anomaly detection. properties: period: type: integer format: int32 description: 'Frequency extracted from the series. Zero means no recurrent pattern has been found.' suggestedWindow: type: integer format: int32 description: Suggested input series points needed for detecting the latest point. expectedValue: type: number format: float description: Expected value of the latest point. upperMargin: type: number format: float description: 'Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as a normal value. Adjusting the marginScale value enables the anomaly status of the latest point to be changed.' lowerMargin: type: number format: float description: 'Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin.' isAnomaly: type: boolean description: 'Anomaly status of the latest point. True means the latest point is an anomaly, either in the negative direction or in the positive direction.' isNegativeAnomaly: type: boolean description: 'Anomaly status of the latest point in a negative direction. True means the latest point is an anomaly and its real value is smaller than the expected one.' isPositiveAnomaly: type: boolean description: 'Anomaly status of the latest point in a positive direction. True means the latest point is an anomaly and its real value is larger than the expected one.' severity: type: number format: float description: 'Severity score for the last input point. The larger the value is, the more severe the anomaly is. For normal points, the severity is always 0.' required: - period - suggestedWindow - expectedValue - upperMargin - lowerMargin - isAnomaly - isNegativeAnomaly - isPositiveAnomaly Univariate.UnivariateChangePointDetectionResult: type: object description: Response of change point detection. properties: period: type: integer format: int32 description: 'Frequency extracted from the series. Zero means no recurrent pattern has been found.' readOnly: true isChangePoint: type: array description: 'Change point properties for each input point. True means an anomaly (either negative or positive) has been detected. The index of the array is consistent with the input series.' items: type: boolean confidenceScores: type: array description: Change point confidence of each point. items: type: number format: float Univariate.AnomalyDetectorErrorCodes: type: string enum: - InvalidCustomInterval - BadArgument - InvalidGranularity - InvalidPeriod - InvalidModelArgument - InvalidSeries - InvalidJsonFormat - RequiredGranularity - RequiredSeries - InvalidImputeMode - InvalidImputeFixedValue x-ms-enum: name: AnomalyDetectorErrorCodes modelAsString: true Univariate.UnivariateEntireDetectionResult: type: object description: Response of the entire anomaly detection. properties: period: type: integer format: int32 description: 'Frequency extracted from the series. Zero means no recurrent pattern has been found.' expectedValues: type: array description: 'Expected value for each input point. The index of the array is consistent with the input series.' items: type: number format: float upperMargins: type: array description: 'Upper margin of each input point. UpperMargin is used to calculate upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. Anomalies in the response can be filtered by upperBoundary and lowerBoundary. Adjusting the marginScale value can help filter less significant anomalies on the client side. The index of the array is consistent with the input series.' items: type: number format: float lowerMargins: type: array description: 'Lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones on the client side. The index of the array is consistent with the input series.' items: type: number format: float isAnomaly: type: array description: 'Anomaly properties for each input point. True means an anomaly (either negative or positive) has been detected. The index of the array is consistent with the input series.' items: type: boolean isNegativeAnomaly: type: array description: 'Anomaly status in a negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.' items: type: boolean isPositiveAnomaly: type: array description: 'Anomaly status in a positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.' items: type: boolean severity: type: array description: 'Severity score for each input point. The larger the value is, the more severe the anomaly is. For normal points, the severity is always 0.' items: type: number format: float required: - period - expectedValues - upperMargins - lowerMargins - isAnomaly - isNegativeAnomaly - isPositiveAnomaly Univariate.AnomalyDetectorError: type: object description: Error information that the API returned. properties: code: $ref: '#/definitions/Univariate.AnomalyDetectorErrorCodes' description: Error code. message: type: string description: Message that explains the error that the service reported. required: - code - message Univariate.ImputeMode: type: string enum: - auto - previous - linear - fixed - zero - notFill x-ms-enum: name: ImputeMode modelAsString: true values: - name: Auto value: auto - name: Previous value: previous - name: Linear value: linear - name: Fixed value: fixed - name: Zero value: zero - name: NotFill value: notFill Univariate.TimeSeriesPoint: type: object description: Definition of input time series points. properties: timestamp: type: string format: date-time description: Argument that indicates the time stamp of a data point (ISO8601 format). value: type: number format: float description: Measurement of that point. required: - value x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'