Skip to Content
OpenPerf

Alert rules

Get an alert rule

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

Returns one alert rule with its conditions, channels and delivery history.

Authorization

cookie
cookiebetter-auth.session_token<token>

Dashboard session cookie

Path Parameters

id*string

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
subscribers*array<>
events*array<>
Example Request
curl -X GET 'https://api.example.com/api/v1/alert-rules/string'
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",
  "subscribers": [
    {
      "id": "string",
      "name": "string",
      "email": "string"
    }
  ],
  "events": [
    {
      "id": "string",
      "type": "new",
      "value": 0,
      "environments": [
        "string"
      ],
      "group": {
        "id": "string",
        "type": "string",
        "message": "string"
      },
      "deliveries": [
        {
          "id": "string",
          "channel": "slack",
          "recipient": "string",
          "status": "pending",
          "error": "string",
          "sentAt": "2019-08-24T14:15:22Z"
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ]
}