Skip to main content
PUT
/
alert-rules
/
{alertRuleId}
Update alert rule
curl --request PUT \
  --url https://api.qovery.com/alert-rules/{alertRuleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "tag": "<string>",
  "condition": {
    "kind": "CUSTOM",
    "operator": "ABOVE",
    "threshold": 123,
    "function": "NONE",
    "promql": "<string>"
  },
  "for_duration": "<string>",
  "severity": "LOW",
  "enabled": true,
  "alert_receiver_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "presentation": {
    "summary": "<string>",
    "runbook_url": "<string>"
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "tag": "<string>",
  "condition": {
    "kind": "CUSTOM",
    "operator": "ABOVE",
    "threshold": 123,
    "function": "NONE",
    "promql": "<string>"
  },
  "for_duration": "<string>",
  "severity": "LOW",
  "enabled": true,
  "alert_receiver_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "presentation": {
    "summary": "<string>",
    "runbook_url": "<string>"
  },
  "target": {
    "target_type": " CLUSTER",
    "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "state": "UNDEPLOYED",
  "is_up_to_date": true
}

Authorizations

Authorization
string
header
required

JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example ' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" '

Path Parameters

alertRuleId
string<uuid>
required

Alert Rule ID

Body

application/json
name
string
required

Name of the alert rule

description
string
required

Description of what the alert monitors

tag
string
required
condition
object
required
for_duration
string<duration>
required

Duration the condition must be true before firing (ISO-8601 duration format)

severity
enum<string>
required

Alert severity level: - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours. - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption. - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours. - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users.

Available options:
LOW,
MEDIUM,
HIGH,
CRITICAL
enabled
boolean
required

Whether the alert rule is enabled

alert_receiver_ids
string<uuid>[]
required

List of alert receiver IDs to send notifications to

Minimum length: 1
presentation
object
required

Response

OK

id
string<uuid>
required
created_at
string<date-time>
required
organization_id
string<uuid>
required

Organization identifier

cluster_id
string<uuid>
required

Cluster identifier

name
string
required

Name of the alert rule

description
string
required

Description of what the alert monitors

tag
string
required
condition
object
required
for_duration
string<duration>
required

Duration the condition must be true before firing (ISO-8601 duration format)

severity
enum<string>
required

Alert severity level: - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours. - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption. - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours. - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users.

Available options:
LOW,
MEDIUM,
HIGH,
CRITICAL
enabled
boolean
required

Whether the alert rule is enabled

alert_receiver_ids
string<uuid>[]
required

List of alert receiver IDs to send notifications to

presentation
object
required
target
object
required
state
enum<string>
required
Available options:
UNDEPLOYED,
OK,
TRIGGERED,
PENDING_NOTIFICATION,
NOTIFIED,
SUPPRESSED,
UNROUTED
is_up_to_date
boolean
required

Indicates whether the current version of the alert has been synced with the alerting system. If false, an outdated version is currently deployed.

updated_at
string<date-time>