Update a project alert rule

put/projects/{projectId}/alertRules/{alertRuleId}

Updates an existing alert rule for a project.

Request Samples

Response Samples

1{
2 "projectId": "proj-001",
3 "name": "High Error Rate Alert",
4 "description": "Updated alert rule for model error rate monitoring",
5 "kpi": "error_rate",
6 "severity": "high",
7 "operator": "greaterThan",
8 "value": 0.05,
9 "violations": 3,
10 "modelRole": "production",
11 "triggered": true,
12 "versionNum": 3
13}

Path Parameters

projectId
string
true

The ID of a project in the common model repository.

alertRuleId
string
true

The ID of the alert rule to update.

Header Parameters

If-Match
string
true

The entity tag that was returned in the ETag response header from a previous GET request. Required to prevent concurrent modification conflicts.

Request Body

The updated alert rule definition.

The alert rule representation.

NameTypeRequiredDescription
projectId
string
false

The ID of a project in the common model repository.

name
string
false

The name of the alert rule.

description
string
false

The description of the alert rule.

kpi
string
false

The name of the KPI.

severity
string
false

The severity of the KPI.

operator
string
false

The operator used for comparison. Operators such as greater than, less than, equal to, and so on.

value
number
false

The value of the KPI.

violations
integer
false

The number of violations.

modelRole
string
false

The role of a model.

triggered
boolean
false

Indicates whether the rule is triggered.

versionNum
integer
false

The version number of the rule.

Responses

StatusMeaningDescription
200OK

The alert rule was updated successfully.

HeadersSchema
400Bad Request

The request was invalid or the alert rule ID was not found.

Schema
404Not Found

The project ID or alert rule ID is not valid.

Schema
412Precondition Failed

The If-Match request header did not match the resource's entity tag (ETag).

Schema
428Precondition Required

The request headers did not include a required If-Match or If-Unmodified-Since precondition.

Schema