# Alert Rules REST API Guide

## List of all alert records during specified time\_bucket\_start and time\_bucket\_end for the given alert rule

> List of all alert records during specified time\_bucket\_start and time\_bucket\_end for the given alert rule

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"start_time":{"name":"start_time","in":"query","description":"requested start time","required":true,"schema":{"type":"string","format":"date-time"}},"end_time":{"name":"end_time","in":"query","description":"requested end time","required":true,"schema":{"type":"string","format":"date-time"}},"limit":{"name":"limit","in":"query","description":"Limit for the pagination","required":false,"schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"Offset for the pagination","required":false,"schema":{"type":"integer"}},"ordering":{"name":"ordering","in":"query","description":"Allows you to order results by any field. For desc order prefix field name with `-` and provide comman separated values for multiple fields","required":false,"schema":{"type":"string"}},"search":{"name":"search","in":"query","description":"Allows you to search by any field.","required":false,"schema":{"type":"string"}},"feature_name":{"name":"feature_name","in":"query","description":"Name of the Feature","required":false,"schema":{"type":"string"}}},"schemas":{"PaginatedApiResponse":{"type":"object","description":"Response object for paginated API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"PAGINATED","enum":["PAGINATED"],"description":"Type of response, indicating a paginated response.\n"},"data":{"type":"object","properties":{"page_size":{"type":"integer","default":10,"description":"Number of items per page in the response.\n"},"item_count":{"type":"integer","default":10,"description":"Number of items in the current page.\n"},"total":{"type":"integer","default":100,"description":"Total number of items across all pages.\n"},"page_count":{"type":"integer","default":10,"description":"Total number of pages.\n"},"page_index":{"type":"integer","default":1,"description":"Current page index.\n"},"offset":{"type":"integer","default":0,"description":"Offset of the first item in the current page.\n"}}}}},"AlertRecord":{"type":"object","title":"AlertRecord","required":["alert_rule_id","alert_rule_revision","critical_threshold","id","alert_time_bucket","severity","alert_value","baseline_time_bucket","baseline_value","message","feature_name","alert_record_main_version","alert_record_sub_version","created_at","updated_at"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for an Alert Record."},"alert_rule_id":{"type":"string","format":"uuid","description":"Unique identifier of the corresponding Alert Rule."},"alert_rule_revision":{"type":"number","nullable":false,"description":"Revision of corresponding Alert Rule."},"warning_threshold":{"type":"number","format":"float","nullable":true,"description":"The warning threshold used to evaluate the Alert Record."},"critical_threshold":{"type":"number","format":"float","nullable":false,"description":"The critical threshold used to evaluate the Alert Record."},"alert_run_start_time":{"type":"number","format":"date-time","description":"Time pointing to when an Alert Record is created."},"baseline_time_bucket":{"type":"number","format":"date-time","nullable":true,"description":"Time pointing to the start of the previous time bucket against which the metric value of this alert_time_bucket is compared. Applies only when the corresponding Alert Rule has 'time_period' based comparision."},"baseline_value":{"type":"number","format":"float","nullable":true,"description":"Value of the metric from the previous time bucket against which the same from this alert_time_bucket is compared. Applies only when the corresponding Alert Rule has 'time_period' based comparision."},"severity":{"$ref":"#/components/schemas/SeverityEnum"},"alert_time_bucket":{"type":"integer","description":"Time pointing to the start of the time bucket for which an Alert Record is created."},"alert_value":{"type":"number","format":"float","description":"Value of the metric from the alert_time_bucket."},"failure_reason":{"type":"string","description":"Error message if anything goes wrong while executing alerting logic."},"message":{"type":"string","description":"A message describing Alert Record."},"feature_name":{"type":"string","description":"Name of a specific feature for which this Alert Record was triggered. Applies only when one or more fetaure names were specified in the corresponding Alert Rule."},"alert_record_main_version":{"type":"integer","description":"Alerting logic is executed every time a metric value is updated for a completed time bin. When an Alert Record is created for the first time for a metric and time bin combination, the main version is set to 1. It is incremented by 1 every time the Severity of the same metric and time bin combination changes. For example, when Severity changes from WARNING to CRITCIAL, alert_record_main_version is incremented by 1."},"alert_record_sub_version":{"type":"integer","description":"Alerting logic is executed every time a metric value is updated for a completed time bin. When an Alert Record is created for the first time for a metric and time bin combination, the main version and sub versions are set to 1. The sub version is incremented by 1 every time the an alert record created with the same Severity for the same metric and time bin combination. Once Severity value changes, for example, from WARNING to CRITCIAL, alert_record_main_version is incremented by 1 and alert_record_sub_version is set back to 1."},"created_at":{"type":"string","format":"date-time","description":"Time pointing to when an Alert Record is created."},"updated_at":{"type":"string","format":"date-time","description":"Time pointing to when an Alert Record is updated."}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"SeverityEnum":{"type":"string","enum":["WARNING","CRITICAL","DEFAULT"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/records":{"get":{"tags":["alert-rules-v3"],"summary":"List of all alert records during specified time_bucket_start and time_bucket_end for the given alert rule","description":"List of all alert records during specified time_bucket_start and time_bucket_end for the given alert rule","operationId":"getAlertRuleRecords","parameters":[{"$ref":"#/components/parameters/alert_id"},{"$ref":"#/components/parameters/start_time"},{"$ref":"#/components/parameters/end_time"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/ordering"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/feature_name"}],"responses":{"200":{"description":"List of all alert records in the given time_bucket_start and time_bucket_end for the given alert rule","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AlertRecord"}}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## List latest alert record for each time bucket during specified time\_bucket\_start and time\_bucket\_end for the given alert rule

> List latest alert record for each time bucket during specified time\_bucket\_start and time\_bucket\_end for the given alert rule

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"start_time":{"name":"start_time","in":"query","description":"requested start time","required":true,"schema":{"type":"string","format":"date-time"}},"end_time":{"name":"end_time","in":"query","description":"requested end time","required":true,"schema":{"type":"string","format":"date-time"}},"feature_name":{"name":"feature_name","in":"query","description":"Name of the Feature","required":false,"schema":{"type":"string"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"AlertRecordHistory":{"allOf":[{"type":"object","properties":{"time_bucket":{"type":"integer","description":"Time pointing to start of a time bucket for which one or more Alert Records are created."},"alert_count":{"type":"integer","description":"Number of Alert Records created for the time_bucket."},"alert_history_count":{"type":"integer","description":"Number of Alert Records created minus one for the time_bucket."},"latest_record":{"$ref":"#/components/schemas/AlertRecordCompact"}},"required":["time_bucket","alert_count","alert_history_count","latest_record"]}]},"AlertRecordCompact":{"type":"object","title":"AlertRecordCompact","required":["id","alert_rule_id","alert_time_bucket","feature_name","alert_value","severity","critical_threshold","created_at"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for an Alert Record."},"alert_rule_id":{"type":"string","format":"uuid","description":"Unique identifier of the corresponding Alert Rule."},"warning_threshold":{"type":"number","format":"float","nullable":true,"description":"The warning threshold used to evaluate the Alert Record."},"critical_threshold":{"type":"number","format":"float","nullable":false,"description":"The critical threshold used to evaluate the Alert Record."},"severity":{"$ref":"#/components/schemas/SeverityEnum"},"alert_time_bucket":{"type":"integer","description":"Time pointing to the start of the time bucket for which an Alert Record is created."},"alert_value":{"type":"number","format":"float","description":"Value of the metric from the alert_time_bucket."},"feature_name":{"type":"string","nullable":true,"description":"Name of a specific feature for which this Alert Record was triggered. Applies only when one or more fetaure names were specified in the corresponding Alert Rule."},"created_at":{"type":"string","format":"date-time","description":"Time pointing to when an Alert Record is created."}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"SeverityEnum":{"type":"string","enum":["WARNING","CRITICAL","DEFAULT"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/record-history":{"get":{"tags":["alert-rules-v3"],"summary":"List latest alert record for each time bucket during specified time_bucket_start and time_bucket_end for the given alert rule","description":"List latest alert record for each time bucket during specified time_bucket_start and time_bucket_end for the given alert rule","operationId":"getAlertRecordHistory","parameters":[{"$ref":"#/components/parameters/alert_id"},{"$ref":"#/components/parameters/start_time"},{"$ref":"#/components/parameters/end_time"},{"$ref":"#/components/parameters/feature_name"}],"responses":{"200":{"description":"List of latest alert record for each time bucket during specified time_bucket_start and time_bucket_end for the given alert rule","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AlertRecordHistory"}}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## List of all alert rule summary in the given time\_bucket\_start and time\_bucket\_end

> List of all alert rule summary in the given time\_bucket\_start and time\_bucket\_end

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"filter":{"name":"filter","in":"query","description":"Allows you to filter by any field.","required":false,"schema":{"type":"string"}},"search":{"name":"search","in":"query","description":"Allows you to search by any field.","required":false,"schema":{"type":"string"}},"ordering":{"name":"ordering","in":"query","description":"Allows you to order results by any field. For desc order prefix field name with `-` and provide comman separated values for multiple fields","required":false,"schema":{"type":"string"}},"limit":{"name":"limit","in":"query","description":"Limit for the pagination","required":false,"schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"Offset for the pagination","required":false,"schema":{"type":"integer"}},"start_time":{"name":"start_time","in":"query","description":"requested start time","required":true,"schema":{"type":"string","format":"date-time"}},"end_time":{"name":"end_time","in":"query","description":"requested end time","required":true,"schema":{"type":"string","format":"date-time"}}},"schemas":{"PaginatedApiResponse":{"type":"object","description":"Response object for paginated API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"PAGINATED","enum":["PAGINATED"],"description":"Type of response, indicating a paginated response.\n"},"data":{"type":"object","properties":{"page_size":{"type":"integer","default":10,"description":"Number of items per page in the response.\n"},"item_count":{"type":"integer","default":10,"description":"Number of items in the current page.\n"},"total":{"type":"integer","default":100,"description":"Total number of items across all pages.\n"},"page_count":{"type":"integer","default":10,"description":"Total number of pages.\n"},"page_index":{"type":"integer","default":1,"description":"Current page index.\n"},"offset":{"type":"integer","default":0,"description":"Offset of the first item in the current page.\n"}}}}},"AlertRuleSummary":{"allOf":[{"type":"object","required":["id","alert_rule_id","name","metric","priority","bin_size","condition","alert_record_count","alert_value","baseline","threshold_type","latest_alert_record_severity","latest_alert_record_value","latest_alert_time_bucket","latest_alert_feature_name","latest_alert_feature_id","model","project","organization"],"properties":{"alert_rule_id":{"type":"string","format":"uuid","description":"Unique identifier for an Alert Rule."},"id":{"type":"string","format":"uuid","description":"Unique identifier of the latest Alert Record."},"name":{"type":"string","description":"Name of an Alert Rule."},"metric":{"$ref":"#/components/schemas/MetricCompact"},"is_fiddler_generated":{"type":"boolean","description":"Boolean indicating whether the Alert Rule is generated by Fiddler."},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"condition":{"type":"string","description":"Metric value comparision (lesser or greater)."},"alert_record_count":{"type":"integer","description":"The number of Alert evaluations that resulted in triggered Alert Records."},"alert_value":{"type":"number","format":"float","description":"Value of the metric from the latest triggered Alert Record for the Alert Rule."},"feature_names":{"type":"array","items":{"type":"string"},"description":"List of feature names, if specified in the Alert Rule."},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"critical_threshold":{"type":"number","format":"double","description":"Critical threshold value specified in the Alert Rule."},"warning_threshold":{"type":"number","format":"double","description":"Warning threshold value specified in the Alert Rule."},"enable_notification":{"type":"boolean","description":"Boolean indicating whether to send notification when an Alert Rule is created."},"compare_bin_delta":{"type":"integer","nullable":true,"description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"latest_alert_record_value":{"type":"number","format":"float","description":"Value of the metric from the latest triggered Alert Record for the Alert Rule."},"latest_alert_time_bucket":{"type":"number","format":"float","description":"Value of the time bucket from the latest triggered Alert Record for the Alert Rule."},"latest_alert_feature_name":{"type":"string","description":"Name of feature from the latest triggered Alert Record for the Alert Rule."},"latest_alert_feature_id":{"type":"string","description":"Id of feature from the latest triggered Alert Record for the Alert Rule."},"latest_threshold":{"type":"number","format":"float","description":"Value of threshold from the latest triggered Alert Record for the Alert Rule."},"latest_alert_record_severity":{"$ref":"#/components/schemas/SeverityEnum"},"severity":{"$ref":"#/components/schemas/SeverityEnum"},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"model":{"$ref":"#/components/schemas/ModelCompact"},"baseline":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BaselineCompact"}]},"segment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SegmentCompact"}]},"created_at":{"type":"string","format":"date-time","description":"The time when the latest triggered Alert Record is created."},"updated_at":{"type":"string","format":"date-time","description":"The time when the latest triggered Alert Record is updated."},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}}]},"MetricCompact":{"type":"object","title":"MetricCompact","required":["id","type","display_name","type_display_name"],"properties":{"id":{"type":"string","description":"Name for builtin metrics, UUID for custom metrics"},"display_name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricTypeEnum"},"type_display_name":{"$ref":"#/components/schemas/MetricTypeDisplayNameEnum"}}},"MetricTypeEnum":{"type":"string","enum":["drift","data_integrity","performance","service_metrics","statistic","custom"]},"MetricTypeDisplayNameEnum":{"type":"string","enum":["Data Drift","Data Integrity","Performance","Traffic","Statistic","Custom Metric"]},"PriorityEnum":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"CompareToEnum":{"type":"string","description":"This API provides two alert evaluation methods, absolute comparisons determine if the current metric value breaches a predefined threshold, while relative comparisons analyze changes in metric by referencing a chosen time period.","enum":["raw_value","time_period"]},"BinSizeEnum":{"type":"string","description":"The Supported bin sizes for the Alert Rules.","enum":["Hour","Day","Week","Month"]},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"SeverityEnum":{"type":"string","enum":["WARNING","CRITICAL","DEFAULT"]},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"ModelCompact":{"type":"object","title":"ModelCompact","description":"Compact version of a model which can be included in the response of relevant APIs.\n","required":["id","name","version"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the model.\n"},"name":{"type":"string","description":"Name of the model.\n"},"version":{"type":"string","description":"Version of the model.\n"}}},"BaselineCompact":{"type":"object","title":"BaselineCompact","description":"Compact version of a baseline which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the baseline.\n"},"name":{"type":"string","description":"Name of the baseline.\n"}}},"SegmentCompact":{"type":"object","title":"SegmentCompact","description":"Compact version of segment for v3","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the saved segment"},"definition":{"type":"string","description":"FQL definition of the applied segment"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/summary":{"get":{"tags":["alert-rules-v3"],"summary":"List of all alert rule summary in the given time_bucket_start and time_bucket_end","description":"List of all alert rule summary in the given time_bucket_start and time_bucket_end","operationId":"getAlertRulesSummary","parameters":[{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/ordering"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/start_time"},{"$ref":"#/components/parameters/end_time"}],"responses":{"200":{"description":"Summary of all alert rules in the given time_bucket_start and time_bucket_end","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AlertRuleSummary"}}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Lists all alert rules configured for a model.

> Lists all alert rules configured for a model.

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"limit":{"name":"limit","in":"query","description":"Limit for the pagination","required":false,"schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"Offset for the pagination","required":false,"schema":{"type":"integer"}},"filter":{"name":"filter","in":"query","description":"Allows you to filter by any field.","required":false,"schema":{"type":"string"}},"ordering":{"name":"ordering","in":"query","description":"Allows you to order results by any field. For desc order prefix field name with `-` and provide comman separated values for multiple fields","required":false,"schema":{"type":"string"}},"search":{"name":"search","in":"query","description":"Allows you to search by any field.","required":false,"schema":{"type":"string"}}},"schemas":{"PaginatedApiResponse":{"type":"object","description":"Response object for paginated API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"PAGINATED","enum":["PAGINATED"],"description":"Type of response, indicating a paginated response.\n"},"data":{"type":"object","properties":{"page_size":{"type":"integer","default":10,"description":"Number of items per page in the response.\n"},"item_count":{"type":"integer","default":10,"description":"Number of items in the current page.\n"},"total":{"type":"integer","default":100,"description":"Total number of items across all pages.\n"},"page_count":{"type":"integer","default":10,"description":"Total number of pages.\n"},"page_index":{"type":"integer","default":1,"description":"Current page index.\n"},"offset":{"type":"integer","default":0,"description":"Offset of the first item in the current page.\n"}}}}},"AlertRule":{"type":"object","required":["id","name","organization","project","model","priority","metric","compare_to","condition","threshold_type","baseline","created_at","updated_at","created_by","updated_by","bin_size","evaluation_delay"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the Alert Rule."},"is_fiddler_generated":{"type":"boolean","description":"Boolean indicating whether the Alert Rule is generated by Fiddler."},"created_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was last updated."},"name":{"type":"string","description":"Name of the Alert Rule."},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"metric":{"$ref":"#/components/schemas/MetricCompact"},"feature_names":{"type":"array","items":{"type":"string"},"description":"List of feature names for which we have created an Alert Rule."},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"condition":{"$ref":"#/components/schemas/ConditionEnum"},"compare_bin_delta":{"type":"integer","description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"evaluation_delay":{"type":"integer","description":"It indroduces the delay in the evaluation of Alert Rule. It is in multiple of hours, and max could be one year."},"category":{"type":"string","description":"Setting Frequency Alerts on categorical columns requires specifying a category. For example, if the column represents geographical locations such as France, Germany, and India, you would pass 'France' as the category and 'geography' as the feature name to set a frequency alert."},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]},"warning_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a warning alert."},"critical_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a critical alert."},"enable_notification":{"type":"boolean","description":"Indicates whether notifications are enabled for the Alert Rule."},"model":{"$ref":"#/components/schemas/ModelCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"baseline":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BaselineCompact"}]},"segment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SegmentCompact"}]},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"MetricCompact":{"type":"object","title":"MetricCompact","required":["id","type","display_name","type_display_name"],"properties":{"id":{"type":"string","description":"Name for builtin metrics, UUID for custom metrics"},"display_name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricTypeEnum"},"type_display_name":{"$ref":"#/components/schemas/MetricTypeDisplayNameEnum"}}},"MetricTypeEnum":{"type":"string","enum":["drift","data_integrity","performance","service_metrics","statistic","custom"]},"MetricTypeDisplayNameEnum":{"type":"string","enum":["Data Drift","Data Integrity","Performance","Traffic","Statistic","Custom Metric"]},"PriorityEnum":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"CompareToEnum":{"type":"string","description":"This API provides two alert evaluation methods, absolute comparisons determine if the current metric value breaches a predefined threshold, while relative comparisons analyze changes in metric by referencing a chosen time period.","enum":["raw_value","time_period"]},"ConditionEnum":{"type":"string","description":"The comparison condition while evaluating the Alert Rule.","enum":["lesser","greater"]},"BinSizeEnum":{"type":"string","description":"The Supported bin sizes for the Alert Rules.","enum":["Hour","Day","Week","Month"]},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"StandardDeviationAlgorithmParams":{"type":"object","description":"Auto threshold parameters for the Alert Rule. These parameters are used to tweak the calculations of the thresholds.","required":["warning_multiplier","critical_multiplier"],"properties":{"warning_multiplier":{"type":"number","format":"float"},"critical_multiplier":{"type":"number","format":"float"}}},"ModelCompact":{"type":"object","title":"ModelCompact","description":"Compact version of a model which can be included in the response of relevant APIs.\n","required":["id","name","version"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the model.\n"},"name":{"type":"string","description":"Name of the model.\n"},"version":{"type":"string","description":"Version of the model.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"BaselineCompact":{"type":"object","title":"BaselineCompact","description":"Compact version of a baseline which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the baseline.\n"},"name":{"type":"string","description":"Name of the baseline.\n"}}},"SegmentCompact":{"type":"object","title":"SegmentCompact","description":"Compact version of segment for v3","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the saved segment"},"definition":{"type":"string","description":"FQL definition of the applied segment"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules":{"get":{"tags":["alert-rules-v3"],"summary":"Lists all alert rules configured for a model.","description":"Lists all alert rules configured for a model.","operationId":"getAlertRules","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/ordering"},{"$ref":"#/components/parameters/search"}],"responses":{"200":{"description":"Get list of Alert Rules in detail","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AlertRule"}}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Creates Alert Rules

> Creates Alert Rules

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"AlertRulePostPayload":{"type":"object","allOf":[{"type":"object","required":["model_id","name","priority","metric_id","bin_size","compare_to","condition","threshold_type"],"properties":{"compare_bin_delta":{"type":"integer","description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"evaluation_delay":{"description":"It indroduces the delay in the evaluation of Alert Rule. It is in multiple of hours, and max could be one year.","type":"integer"},"model_id":{"description":"Unique identifier of the model.","type":"string","format":"uuid"},"segment_id":{"description":"Unique identifier of the segment.","type":"string","format":"uuid"},"name":{"description":"Name of the Alert Rule.","type":"string"},"metric_id":{"description":"The unique identifier of the metric for which we want to create an Alert Rule.","type":"string"},"feature_names":{"description":"List of feature names for which we want to create an Alert Rule.","type":"array","items":{"type":"string"}},"category":{"type":"string","description":"Setting Frequency Alerts on categorical columns requires specifying a category. For example, if the column represents geographical locations such as France, Germany, and India, you would pass 'France' as the category and 'geography' as the feature name to set a frequency alert."},"baseline_id":{"description":"It should only be specified for the drift Alert Rules. Is is unique identifier of the baseline selected for drift calculations.","type":"string","format":"uuid"},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"condition":{"$ref":"#/components/schemas/ConditionEnum"},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]},"warning_threshold":{"description":"Threshold value for triggering a warning alert.","type":"number","format":"double"},"critical_threshold":{"description":"Threshold value for triggering a critical alert.","type":"number","format":"double"}}}]},"PriorityEnum":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"BinSizeEnum":{"type":"string","description":"The Supported bin sizes for the Alert Rules.","enum":["Hour","Day","Week","Month"]},"CompareToEnum":{"type":"string","description":"This API provides two alert evaluation methods, absolute comparisons determine if the current metric value breaches a predefined threshold, while relative comparisons analyze changes in metric by referencing a chosen time period.","enum":["raw_value","time_period"]},"ConditionEnum":{"type":"string","description":"The comparison condition while evaluating the Alert Rule.","enum":["lesser","greater"]},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"StandardDeviationAlgorithmParams":{"type":"object","description":"Auto threshold parameters for the Alert Rule. These parameters are used to tweak the calculations of the thresholds.","required":["warning_multiplier","critical_multiplier"],"properties":{"warning_multiplier":{"type":"number","format":"float"},"critical_multiplier":{"type":"number","format":"float"}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"AlertRule":{"type":"object","required":["id","name","organization","project","model","priority","metric","compare_to","condition","threshold_type","baseline","created_at","updated_at","created_by","updated_by","bin_size","evaluation_delay"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the Alert Rule."},"is_fiddler_generated":{"type":"boolean","description":"Boolean indicating whether the Alert Rule is generated by Fiddler."},"created_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was last updated."},"name":{"type":"string","description":"Name of the Alert Rule."},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"metric":{"$ref":"#/components/schemas/MetricCompact"},"feature_names":{"type":"array","items":{"type":"string"},"description":"List of feature names for which we have created an Alert Rule."},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"condition":{"$ref":"#/components/schemas/ConditionEnum"},"compare_bin_delta":{"type":"integer","description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"evaluation_delay":{"type":"integer","description":"It indroduces the delay in the evaluation of Alert Rule. It is in multiple of hours, and max could be one year."},"category":{"type":"string","description":"Setting Frequency Alerts on categorical columns requires specifying a category. For example, if the column represents geographical locations such as France, Germany, and India, you would pass 'France' as the category and 'geography' as the feature name to set a frequency alert."},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]},"warning_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a warning alert."},"critical_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a critical alert."},"enable_notification":{"type":"boolean","description":"Indicates whether notifications are enabled for the Alert Rule."},"model":{"$ref":"#/components/schemas/ModelCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"baseline":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BaselineCompact"}]},"segment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SegmentCompact"}]},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"MetricCompact":{"type":"object","title":"MetricCompact","required":["id","type","display_name","type_display_name"],"properties":{"id":{"type":"string","description":"Name for builtin metrics, UUID for custom metrics"},"display_name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricTypeEnum"},"type_display_name":{"$ref":"#/components/schemas/MetricTypeDisplayNameEnum"}}},"MetricTypeEnum":{"type":"string","enum":["drift","data_integrity","performance","service_metrics","statistic","custom"]},"MetricTypeDisplayNameEnum":{"type":"string","enum":["Data Drift","Data Integrity","Performance","Traffic","Statistic","Custom Metric"]},"ModelCompact":{"type":"object","title":"ModelCompact","description":"Compact version of a model which can be included in the response of relevant APIs.\n","required":["id","name","version"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the model.\n"},"name":{"type":"string","description":"Name of the model.\n"},"version":{"type":"string","description":"Version of the model.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"BaselineCompact":{"type":"object","title":"BaselineCompact","description":"Compact version of a baseline which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the baseline.\n"},"name":{"type":"string","description":"Name of the baseline.\n"}}},"SegmentCompact":{"type":"object","title":"SegmentCompact","description":"Compact version of segment for v3","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the saved segment"},"definition":{"type":"string","description":"FQL definition of the applied segment"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream connect error or disconnect/reset before headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules":{"post":{"tags":["alert-rules-v3"],"summary":"Creates Alert Rules","description":"Creates Alert Rules","operationId":"createAlert","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AlertRulePostPayload"}]}}}},"responses":{"200":{"description":"successful completion","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AlertRule"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}}}
```

## Returns notification for the given Alert Rule id

> Returns notification for the given Alert Rule id

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"Notification":{"type":"object","required":["emails","pagerduty_services","pagerduty_severity","webhooks"],"properties":{"emails":{"type":"array","items":{"type":"string"}},"pagerduty_services":{"type":"array","items":{"type":"string"}},"pagerduty_severity":{"type":"string"},"webhooks":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/notification":{"get":{"tags":["alert-rules-v3"],"summary":"Returns notification for the given Alert Rule id","description":"Returns notification for the given Alert Rule id","operationId":"getNotificationForAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"responses":{"200":{"description":"Notification Details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Notification"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## POST /v3/alert-rules/{alert\_id}/notification

> Create Notification for an Alert Rule

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"NotificationPayload":{"type":"object","minProperties":1,"properties":{"emails":{"type":"array","items":{"type":"string"}},"pagerduty_services":{"type":"array","items":{"type":"string"}},"pagerduty_severity":{"type":"string"},"webhooks":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"Notification":{"type":"object","required":["emails","pagerduty_services","pagerduty_severity","webhooks"],"properties":{"emails":{"type":"array","items":{"type":"string"}},"pagerduty_services":{"type":"array","items":{"type":"string"}},"pagerduty_severity":{"type":"string"},"webhooks":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream connect error or disconnect/reset before headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/notification":{"post":{"tags":["alert-rules-v3"],"description":"Create Notification for an Alert Rule","operationId":"createNotificationForAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NotificationPayload"}]}}}},"responses":{"200":{"description":"successful completion","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Notification"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}}}
```

## Update by id

> Update Notification by Alert Rule id

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"NotificationPayload":{"type":"object","minProperties":1,"properties":{"emails":{"type":"array","items":{"type":"string"}},"pagerduty_services":{"type":"array","items":{"type":"string"}},"pagerduty_severity":{"type":"string"},"webhooks":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"Notification":{"type":"object","required":["emails","pagerduty_services","pagerduty_severity","webhooks"],"properties":{"emails":{"type":"array","items":{"type":"string"}},"pagerduty_services":{"type":"array","items":{"type":"string"}},"pagerduty_severity":{"type":"string"},"webhooks":{"type":"array","items":{"type":"string","format":"uuid"}}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream connect error or disconnect/reset before headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/notification":{"patch":{"tags":["alert-rules-v3"],"summary":"Update by id","description":"Update Notification by Alert Rule id","operationId":"updateNotificationForAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NotificationPayload"}]}}}},"responses":{"200":{"description":"Get detail info","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Notification"}]}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}}}
```

## Returns Alert Rule for the given id

> Returns Alert Rule for the given id

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"AlertRule":{"type":"object","required":["id","name","organization","project","model","priority","metric","compare_to","condition","threshold_type","baseline","created_at","updated_at","created_by","updated_by","bin_size","evaluation_delay"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the Alert Rule."},"is_fiddler_generated":{"type":"boolean","description":"Boolean indicating whether the Alert Rule is generated by Fiddler."},"created_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was last updated."},"name":{"type":"string","description":"Name of the Alert Rule."},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"metric":{"$ref":"#/components/schemas/MetricCompact"},"feature_names":{"type":"array","items":{"type":"string"},"description":"List of feature names for which we have created an Alert Rule."},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"condition":{"$ref":"#/components/schemas/ConditionEnum"},"compare_bin_delta":{"type":"integer","description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"evaluation_delay":{"type":"integer","description":"It indroduces the delay in the evaluation of Alert Rule. It is in multiple of hours, and max could be one year."},"category":{"type":"string","description":"Setting Frequency Alerts on categorical columns requires specifying a category. For example, if the column represents geographical locations such as France, Germany, and India, you would pass 'France' as the category and 'geography' as the feature name to set a frequency alert."},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]},"warning_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a warning alert."},"critical_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a critical alert."},"enable_notification":{"type":"boolean","description":"Indicates whether notifications are enabled for the Alert Rule."},"model":{"$ref":"#/components/schemas/ModelCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"baseline":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BaselineCompact"}]},"segment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SegmentCompact"}]},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"MetricCompact":{"type":"object","title":"MetricCompact","required":["id","type","display_name","type_display_name"],"properties":{"id":{"type":"string","description":"Name for builtin metrics, UUID for custom metrics"},"display_name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricTypeEnum"},"type_display_name":{"$ref":"#/components/schemas/MetricTypeDisplayNameEnum"}}},"MetricTypeEnum":{"type":"string","enum":["drift","data_integrity","performance","service_metrics","statistic","custom"]},"MetricTypeDisplayNameEnum":{"type":"string","enum":["Data Drift","Data Integrity","Performance","Traffic","Statistic","Custom Metric"]},"PriorityEnum":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"CompareToEnum":{"type":"string","description":"This API provides two alert evaluation methods, absolute comparisons determine if the current metric value breaches a predefined threshold, while relative comparisons analyze changes in metric by referencing a chosen time period.","enum":["raw_value","time_period"]},"ConditionEnum":{"type":"string","description":"The comparison condition while evaluating the Alert Rule.","enum":["lesser","greater"]},"BinSizeEnum":{"type":"string","description":"The Supported bin sizes for the Alert Rules.","enum":["Hour","Day","Week","Month"]},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"StandardDeviationAlgorithmParams":{"type":"object","description":"Auto threshold parameters for the Alert Rule. These parameters are used to tweak the calculations of the thresholds.","required":["warning_multiplier","critical_multiplier"],"properties":{"warning_multiplier":{"type":"number","format":"float"},"critical_multiplier":{"type":"number","format":"float"}}},"ModelCompact":{"type":"object","title":"ModelCompact","description":"Compact version of a model which can be included in the response of relevant APIs.\n","required":["id","name","version"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the model.\n"},"name":{"type":"string","description":"Name of the model.\n"},"version":{"type":"string","description":"Version of the model.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"BaselineCompact":{"type":"object","title":"BaselineCompact","description":"Compact version of a baseline which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the baseline.\n"},"name":{"type":"string","description":"Name of the baseline.\n"}}},"SegmentCompact":{"type":"object","title":"SegmentCompact","description":"Compact version of segment for v3","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the saved segment"},"definition":{"type":"string","description":"FQL definition of the applied segment"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}":{"get":{"tags":["alert-rules-v3"],"summary":"Returns Alert Rule for the given id","description":"Returns Alert Rule for the given id","operationId":"getAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"responses":{"200":{"description":"Alert Rule details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AlertRule"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Deletes an Alert Rule

> Deletes an Alert Rule

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"responses":{"200":{"description":"Success","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}}},"paths":{"/v3/alert-rules/{alert_id}":{"delete":{"tags":["alert-rules-v3"],"summary":"Deletes an Alert Rule","description":"Deletes an Alert Rule","operationId":"deleteAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"responses":{"200":{"$ref":"#/components/responses/200"},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Update by id

> Update Alert Rule by id

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"AlertRuleUpdatableFields":{"type":"object","properties":{"name":{"description":"Name of the Alert Rule.","type":"string"},"warning_threshold":{"description":"Warning threshold for the Alert Rule.","type":"number","format":"float","nullable":true},"critical_threshold":{"description":"Critical threshold for the Alert Rule.","type":"number","format":"float"},"evaluation_delay":{"description":"Evaluation Delay for the Alert Rule. It is in number of hours.","type":"number","format":"integer"},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"enable_notification":{"description":"Indicates whether notifications are enabled for the Alert Rule.","type":"boolean"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]}}},"PriorityEnum":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"StandardDeviationAlgorithmParams":{"type":"object","description":"Auto threshold parameters for the Alert Rule. These parameters are used to tweak the calculations of the thresholds.","required":["warning_multiplier","critical_multiplier"],"properties":{"warning_multiplier":{"type":"number","format":"float"},"critical_multiplier":{"type":"number","format":"float"}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"AlertRule":{"type":"object","required":["id","name","organization","project","model","priority","metric","compare_to","condition","threshold_type","baseline","created_at","updated_at","created_by","updated_by","bin_size","evaluation_delay"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the Alert Rule."},"is_fiddler_generated":{"type":"boolean","description":"Boolean indicating whether the Alert Rule is generated by Fiddler."},"created_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp indicating when the Alert Rule was last updated."},"name":{"type":"string","description":"Name of the Alert Rule."},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"metric":{"$ref":"#/components/schemas/MetricCompact"},"feature_names":{"type":"array","items":{"type":"string"},"description":"List of feature names for which we have created an Alert Rule."},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"compare_to":{"$ref":"#/components/schemas/CompareToEnum"},"condition":{"$ref":"#/components/schemas/ConditionEnum"},"compare_bin_delta":{"type":"integer","description":"This field specifies the lookback period for relative comparisons, expressed as a multiple of the chosen time bin size. It determines the historical data timeframe used to evaluate changes in the metric value."},"evaluation_delay":{"type":"integer","description":"It indroduces the delay in the evaluation of Alert Rule. It is in multiple of hours, and max could be one year."},"category":{"type":"string","description":"Setting Frequency Alerts on categorical columns requires specifying a category. For example, if the column represents geographical locations such as France, Germany, and India, you would pass 'France' as the category and 'geography' as the feature name to set a frequency alert."},"bin_size":{"$ref":"#/components/schemas/BinSizeEnum"},"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"auto_threshold_params":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StandardDeviationAlgorithmParams"}]},"warning_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a warning alert."},"critical_threshold":{"type":"number","format":"double","description":"Threshold value for triggering a critical alert."},"enable_notification":{"type":"boolean","description":"Indicates whether notifications are enabled for the Alert Rule."},"model":{"$ref":"#/components/schemas/ModelCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"baseline":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BaselineCompact"}]},"segment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SegmentCompact"}]},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"MetricCompact":{"type":"object","title":"MetricCompact","required":["id","type","display_name","type_display_name"],"properties":{"id":{"type":"string","description":"Name for builtin metrics, UUID for custom metrics"},"display_name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricTypeEnum"},"type_display_name":{"$ref":"#/components/schemas/MetricTypeDisplayNameEnum"}}},"MetricTypeEnum":{"type":"string","enum":["drift","data_integrity","performance","service_metrics","statistic","custom"]},"MetricTypeDisplayNameEnum":{"type":"string","enum":["Data Drift","Data Integrity","Performance","Traffic","Statistic","Custom Metric"]},"CompareToEnum":{"type":"string","description":"This API provides two alert evaluation methods, absolute comparisons determine if the current metric value breaches a predefined threshold, while relative comparisons analyze changes in metric by referencing a chosen time period.","enum":["raw_value","time_period"]},"ConditionEnum":{"type":"string","description":"The comparison condition while evaluating the Alert Rule.","enum":["lesser","greater"]},"BinSizeEnum":{"type":"string","description":"The Supported bin sizes for the Alert Rules.","enum":["Hour","Day","Week","Month"]},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"ModelCompact":{"type":"object","title":"ModelCompact","description":"Compact version of a model which can be included in the response of relevant APIs.\n","required":["id","name","version"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the model.\n"},"name":{"type":"string","description":"Name of the model.\n"},"version":{"type":"string","description":"Version of the model.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"BaselineCompact":{"type":"object","title":"BaselineCompact","description":"Compact version of a baseline which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the baseline.\n"},"name":{"type":"string","description":"Name of the baseline.\n"}}},"SegmentCompact":{"type":"object","title":"SegmentCompact","description":"Compact version of segment for v3","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the saved segment"},"definition":{"type":"string","description":"FQL definition of the applied segment"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}":{"patch":{"tags":["alert-rules-v3"],"summary":"Update by id","description":"Update Alert Rule by id","operationId":"updateAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AlertRuleUpdatableFields"}]}}}},"responses":{"200":{"description":"Get detail info","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/AlertRule"}]}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get thresholds that were used to evaluate the given time bin using the given alert rule.

> Get thresholds that were used to evaluate the given time bin using the given alert rule.

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"alert_time_bucket":{"name":"alert_time_bucket","in":"query","description":"Timestamp(in milliseconds) pointing to the start of the time bin","required":true,"schema":{"type":"number","format":"integer"}},"feature_name":{"name":"feature_name","in":"query","description":"Name of the Feature","required":false,"schema":{"type":"string"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"AlertThresholdsForBinResponse":{"type":"object","required":["threshold_type","critical_threshold"],"properties":{"threshold_type":{"$ref":"#/components/schemas/ThresholdAlgoEnum"},"warning_threshold":{"type":"number","format":"float"},"critical_threshold":{"type":"number","format":"float"}}},"ThresholdAlgoEnum":{"type":"string","description":"The type of threshold algorithm used to evaluate alerts.","enum":["manual","standard_deviation_auto_threshold"]},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/get-thresholds":{"get":{"tags":["alert-rules-v3"],"summary":"Get thresholds that were used to evaluate the given time bin using the given alert rule.","description":"Get thresholds that were used to evaluate the given time bin using the given alert rule.","operationId":"getAlertThresholdsForTimeBin","parameters":[{"$ref":"#/components/parameters/alert_id"},{"$ref":"#/components/parameters/alert_time_bucket"},{"$ref":"#/components/parameters/feature_name"}],"responses":{"200":{"description":"Thresholds that were used to evaluate the given time bin using the given alert rule.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AlertThresholdsForBinResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Send a test notification for the given Alert Rule

> Send a test notification for the given Alert Rule to verify notification configuration

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"alert-rules-v3","description":"CRUD for Alert Rules, Summary, and Stats APIs"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"alert_id":{"name":"alert_id","in":"path","description":"alert id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"TestNotificationResponse":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/TestNotificationChannelResult"},"description":"Per-channel results of the test notification attempt."},"message":{"type":"string","nullable":true,"description":"Optional message, e.g. when no channels are configured."}}},"TestNotificationChannelResult":{"type":"object","required":["channel_type","is_sent_success"],"properties":{"channel_type":{"type":"string","enum":["email","pagerduty","webhook"],"description":"The type of notification channel."},"is_sent_success":{"type":"boolean","description":"Whether the test notification was sent successfully."},"failure_reason":{"type":"string","nullable":true,"description":"The reason for failure if the notification was not sent successfully."}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/alert-rules/{alert_id}/test-notification":{"post":{"tags":["alert-rules-v3"],"summary":"Send a test notification for the given Alert Rule","description":"Send a test notification for the given Alert Rule to verify notification configuration","operationId":"testNotificationForAlertRule","parameters":[{"$ref":"#/components/parameters/alert_id"}],"responses":{"200":{"description":"Test notification results per channel","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TestNotificationResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/rest-api/rest-api/alert-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
