swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Metric API schemes: - https tags: - name: Metric paths: /metrics/{metricId}/data/query: post: tags: - Metric summary: Microsoft Azure Get Time Series Data From Metric operationId: microsoftAzureGetmetricdata consumes: - application/json produces: - application/json parameters: - in: path name: metricId description: metric unique id required: true type: string format: uuid - in: body name: body description: query time series data condition required: true schema: $ref: '#/definitions/MetricDataQueryOptions' responses: '200': description: Success schema: $ref: '#/definitions/MetricDataList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-examples: Get time series data from metric: $ref: ./examples/getMetricData.json description: Needs a more full description created. /metrics/{metricId}/series/query: post: tags: - Metric summary: Microsoft Azure List Series Dimension Combinations From Metric operationId: microsoftAzureGetmetricseries consumes: - application/json produces: - application/json parameters: - in: path name: metricId description: metric unique id required: true type: string format: uuid - in: query name: $skip description: for paging, skipped number type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page type: integer format: int32 - in: body name: body description: filter to query series required: true schema: $ref: '#/definitions/MetricSeriesQueryOptions' responses: '200': description: Success schema: $ref: '#/definitions/MetricSeriesList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: List series (dimension combinations) from metric: $ref: ./examples/getMetricSeries.json description: Needs a more full description created. /metrics/{metricId}/dimension/query: post: tags: - Metric summary: Microsoft Azure List Dimension From Certain Metric operationId: microsoftAzureGetmetricdimension consumes: - application/json produces: - application/json parameters: - in: path name: metricId description: metric unique id required: true type: string format: uuid - in: query name: $skip description: for paging, skipped number type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page type: integer format: int32 - in: body name: body description: query dimension option required: true schema: $ref: '#/definitions/MetricDimensionQueryOptions' responses: '200': description: Success schema: $ref: '#/definitions/MetricDimensionList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: List dimension from certain metric: $ref: ./examples/getMetricDimension.json description: Needs a more full description created. /metrics/{metricId}/enrichment/anomalyDetection/configurations: get: tags: - Metric summary: Microsoft Azure List All Anomaly Detection Configurations For Specific Metric operationId: microsoftAzureGetanomalydetectionconfigurationsbymetric produces: - application/json parameters: - in: path name: metricId description: metric unique id required: true type: string format: uuid - in: query name: $skip description: for paging, skipped number type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page type: integer format: int32 responses: '200': description: Success schema: $ref: '#/definitions/AnomalyDetectionConfigurationList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: List all anomaly detection configurations for specific metric: $ref: ./examples/getAnomalyDetectionConfigurationsByMetric.json description: Needs a more full description created. /metrics/{metricId}/status/enrichment/anomalyDetection/query: post: tags: - Metric summary: Microsoft Azure Query Anomaly Detection Status operationId: microsoftAzureGetenrichmentstatusbymetric consumes: - application/json produces: - application/json parameters: - in: path name: metricId description: metric unique id required: true type: string format: uuid - in: query name: $skip description: for paging, skipped number type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page type: integer format: int32 - in: body name: body description: query options required: true schema: $ref: '#/definitions/EnrichmentStatusQueryOption' responses: '200': description: Success schema: $ref: '#/definitions/EnrichmentStatusList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: Query anomaly detection status: $ref: ./examples/getEnrichmentStatusByMetric.json description: Needs a more full description created. definitions: SeriesConfiguration: required: - series type: object properties: series: $ref: '#/definitions/SeriesIdentity' conditionOperator: description: "condition operator\r\n\r\nshould be specified when combining multiple detection conditions" enum: - AND - OR type: string x-ms-enum: name: AnomalyDetectionConfigurationLogicType modelAsString: true smartDetectionCondition: $ref: '#/definitions/SmartDetectionCondition' hardThresholdCondition: $ref: '#/definitions/HardThresholdCondition' changeThresholdCondition: $ref: '#/definitions/ChangeThresholdCondition' HardThresholdCondition: required: - anomalyDetectorDirection - suppressCondition type: object properties: lowerBound: format: double description: "lower bound\r\n\r\nshould be specified when anomalyDetectorDirection is Both or Down" type: number upperBound: format: double description: "upper bound\r\n\r\nshould be specified when anomalyDetectorDirection is Both or Up" type: number anomalyDetectorDirection: description: detection direction enum: - Both - Down - Up type: string x-ms-enum: name: AnomalyDetectorDirection modelAsString: true suppressCondition: $ref: '#/definitions/SuppressCondition' SmartDetectionCondition: required: - anomalyDetectorDirection - sensitivity - suppressCondition type: object properties: sensitivity: format: double description: 'sensitivity, value range : (0, 100]' type: number anomalyDetectorDirection: description: detection direction enum: - Both - Down - Up type: string x-ms-enum: name: AnomalyDetectorDirection modelAsString: true suppressCondition: $ref: '#/definitions/SuppressCondition' MetricDimensionList: type: object properties: '@nextLink': type: string readOnly: true value: uniqueItems: true type: array items: type: string readOnly: true EnrichmentStatus: type: object properties: timestamp: format: date-time description: data slice timestamp. type: string readOnly: true status: description: latest enrichment status for this data slice. type: string readOnly: true message: description: the trimmed message describes details of the enrichment status. type: string readOnly: true AnomalyDetectionConfiguration: required: - metricId - name - wholeMetricConfiguration type: object properties: anomalyDetectionConfigurationId: format: uuid description: anomaly detection configuration unique id type: string readOnly: true name: description: anomaly detection configuration name type: string description: description: anomaly detection configuration description default: '' type: string metricId: format: uuid description: metric unique id type: string wholeMetricConfiguration: $ref: '#/definitions/WholeMetricConfiguration' dimensionGroupOverrideConfigurations: description: detection configuration for series group uniqueItems: true type: array items: $ref: '#/definitions/DimensionGroupConfiguration' seriesOverrideConfigurations: description: detection configuration for specific series uniqueItems: true type: array items: $ref: '#/definitions/SeriesConfiguration' example: name: Anomaly detection configuration name description: Anomaly detection configuration description metricId: 22222222-2222-2222-2222-000000000001 wholeMetricConfiguration: conditionOperator: AND smartDetectionCondition: sensitivity: 91 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 hardThresholdCondition: lowerBound: 1 upperBound: 100 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 changeThresholdCondition: changePercentage: 5 shiftPoint: 1 withinRange: false anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 dimensionGroupOverrideConfigurations: - group: dimension: city: Beijing conditionOperator: AND smartDetectionCondition: sensitivity: 91 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 hardThresholdCondition: lowerBound: 1 upperBound: 100 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 changeThresholdCondition: changePercentage: 5 shiftPoint: 1 withinRange: false anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 seriesOverrideConfigurations: - series: dimension: category: Jewelry city: Beijing conditionOperator: AND smartDetectionCondition: sensitivity: 91 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 hardThresholdCondition: lowerBound: 1 upperBound: 100 anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 changeThresholdCondition: changePercentage: 5 shiftPoint: 1 withinRange: false anomalyDetectorDirection: Both suppressCondition: minNumber: 1 minRatio: 100 MetricDataItem: type: object properties: id: $ref: '#/definitions/MetricSeriesItem' timestampList: description: timestamps of the data related to this time series type: array items: format: date-time type: string readOnly: true valueList: description: values of the data related to this time series type: array items: format: double type: number readOnly: true SeriesIdentity: required: - dimension type: object properties: dimension: description: dimension specified for series type: object additionalProperties: type: string DimensionGroupIdentity: required: - dimension type: object properties: dimension: description: dimension specified for series group type: object additionalProperties: type: string MetricSeriesItem: type: object properties: metricId: format: uuid description: metric unique id type: string readOnly: true dimension: description: dimension name and value pair type: object additionalProperties: type: string readOnly: true EnrichmentStatusQueryOption: required: - endTime - startTime type: object properties: startTime: format: date-time description: the start point of time range to query anomaly detection status. type: string endTime: format: date-time description: the end point of time range to query anomaly detection status. type: string example: startTime: '2020-01-01T00:00:00Z' endTime: '2020-02-01T00:00:00Z' EnrichmentStatusList: type: object properties: '@nextLink': type: string readOnly: true value: type: array items: $ref: '#/definitions/EnrichmentStatus' readOnly: true SuppressCondition: required: - minNumber - minRatio type: object properties: minNumber: format: int32 description: 'min point number, value range : [1, +∞)' type: integer minRatio: format: double description: 'min point ratio, value range : (0, 100]' type: number MetricDataList: type: object properties: value: type: array items: $ref: '#/definitions/MetricDataItem' readOnly: true MetricDataQueryOptions: required: - endTime - series - startTime type: object properties: startTime: format: date-time description: start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ. The maximum number of data points (series number * time range) is 10000. type: string endTime: format: date-time description: start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ. The maximum number of data points (series number * time range) is 10000. type: string series: description: query specific series. The maximum number of series is 100. type: array items: type: object additionalProperties: type: string example: startTime: '2020-01-01T00:00:00Z' endTime: '2020-02-01T00:00:00Z' series: - category: __SUM__ city: Beijing WholeMetricConfiguration: type: object properties: conditionOperator: description: "condition operator\r\n\r\nshould be specified when combining multiple detection conditions" enum: - AND - OR type: string x-ms-enum: name: AnomalyDetectionConfigurationLogicType modelAsString: true smartDetectionCondition: $ref: '#/definitions/SmartDetectionCondition' hardThresholdCondition: $ref: '#/definitions/HardThresholdCondition' changeThresholdCondition: $ref: '#/definitions/ChangeThresholdCondition' DimensionGroupConfiguration: required: - group type: object properties: group: $ref: '#/definitions/DimensionGroupIdentity' conditionOperator: description: "condition operator\r\n\r\nshould be specified when combining multiple detection conditions" enum: - AND - OR type: string x-ms-enum: name: AnomalyDetectionConfigurationLogicType modelAsString: true smartDetectionCondition: $ref: '#/definitions/SmartDetectionCondition' hardThresholdCondition: $ref: '#/definitions/HardThresholdCondition' changeThresholdCondition: $ref: '#/definitions/ChangeThresholdCondition' ChangeThresholdCondition: required: - anomalyDetectorDirection - changePercentage - shiftPoint - suppressCondition - withinRange type: object properties: changePercentage: format: double description: 'change percentage, value range : [0, +∞)' type: number shiftPoint: format: int32 description: 'shift point, value range : [1, +∞)' type: integer withinRange: description: "if the withinRange = true, detected data is abnormal when the value falls in the range, in this case anomalyDetectorDirection must be Both\r\nif the withinRange = false, detected data is abnormal when the value falls out of the range" type: boolean anomalyDetectorDirection: description: detection direction enum: - Both - Down - Up type: string x-ms-enum: name: AnomalyDetectorDirection modelAsString: true suppressCondition: $ref: '#/definitions/SuppressCondition' MetricSeriesQueryOptions: required: - activeSince type: object properties: activeSince: format: date-time description: query series ingested after this time, the format should be yyyy-MM-ddTHH:mm:ssZ type: string dimensionFilter: description: filter specific dimension name and values type: object additionalProperties: type: array items: type: string example: activeSince: '2020-01-01T00:00:00Z' dimensionFilter: city: - Beijing ErrorCode: type: object properties: message: type: string code: type: string MetricSeriesList: type: object properties: '@nextLink': type: string readOnly: true value: type: array items: $ref: '#/definitions/MetricSeriesItem' readOnly: true AnomalyDetectionConfigurationList: type: object properties: value: type: array items: $ref: '#/definitions/AnomalyDetectionConfiguration' readOnly: true '@nextLink': type: string readOnly: true MetricDimensionQueryOptions: required: - dimensionName type: object properties: dimensionName: description: dimension name type: string dimensionValueFilter: description: dimension value to be filtered type: string example: dimensionName: city x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'