Skip to Content
OpenPerf

Alert rules

Update an alert rule

PATCH
/api/v1/alert-rules/{id}

Updates an alert rule. Send only the fields to change.

Authorization

cookie
cookiebetter-auth.session_token<token>

Dashboard session cookie

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
Length1 <= length <= 120
kind?string
Value in"new_issue""regression""issue_spike""error_count""failure_rate""p95_latency"
environments?array<>
Itemsitems <= 50
comparison?|null
threshold?|
Range0 <= value <= 1000000000
windowMinutes?|
Range1 <= value <= 1440
cooldownMinutes?integer
Range0 <= value <= 1440
notifyRecovery?boolean
enabled?boolean
integrationIds?array<>
Itemsitems <= 20
subscriberIds?array<>
Itemsitems <= 200
mutedUntil?|
Formatdate-time

Response Body

application/json
  1. response
id*string
name*string
projectId*string
projectName*string
kind*string
Value in"new_issue""regression""issue_spike""error_count""failure_rate""p95_latency"
environments*array<string>
comparison*|null
threshold*number|null
windowMinutes*integer|null
cooldownMinutes*integer
notifyRecovery*boolean
enabled*boolean
mutedUntil*|
Formatdate-time
phase*string
Value in"ok""firing"
lastTriggeredAt*|
Formatdate-time
subscribed*boolean
subscriberCount*integer
integrationIds*array<string>
createdBy*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.example.com/api/v1/alert-rules/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "id": "string",
  "name": "string",
  "projectId": "string",
  "projectName": "string",
  "kind": "new_issue",
  "environments": [
    "string"
  ],
  "comparison": "above",
  "threshold": 0,
  "windowMinutes": 0,
  "cooldownMinutes": 0,
  "notifyRecovery": true,
  "enabled": true,
  "mutedUntil": "2019-08-24T14:15:22Z",
  "phase": "ok",
  "lastTriggeredAt": "2019-08-24T14:15:22Z",
  "subscribed": true,
  "subscriberCount": 0,
  "integrationIds": [
    "string"
  ],
  "createdBy": {
    "id": "string",
    "name": "string"
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}