Alarms

Update an alarm

Updates an alarm's settings.

patch/projects/{project_id}/alarms/{alarm_id}

Request

Path parameters

project_idstring required
Example:Xk9mZp

Project ID

alarm_idstring required
Example:Qx7LmP2vRt9K

Alarm ID

Request body

namestring

Alarm name

descriptionstring nullable

What the alarm watches for, shown with it in Honeybadger. Null clears it.

querystring

BadgerQL query evaluated on each check

stream_idsstring[] nullable

Stream identifiers to query. A set; can't be empty. Order is ignored and duplicates are dropped. Null resets it to every current stream in the project.

evaluation_periodstring

Window each evaluation covers, as a compact duration. At least 1m and less than a week (w units are refused).

lookback_lagstring

How far behind now the window ends

Example request

{
  "evaluation_period": "10m",
  "lookback_lag": "1m",
  "trigger_config": {
    "type": "alert_result_count",
    "config": {
      "operator": "gt",
      "value": 10
    }
  }
}

Response

Success

Example response

{
  "data": {
    "id": "Qx7LmP2vRt9K",
    "project_id": "Xk9mZp",
    "name": "High Error Rate",
    "description": "Fires when checkout errors spike",
    "query": "filter event_type::str == \"notice\" | stats count() as count",
    "evaluation_period": "10m",
    "lookback_lag": "1m",
    "trigger_config": {
      "type": "alert_result_count",
      "config": {
        "operator": "gt",
        "value": 10
      }
    },
    "links": {
      "web": "https://app.honeybadger.io/projects/Xk9mZp"
    }
  },
  "meta": {
    "request_id": "6f1c2b0e-8d4a-4f6e-9b2a-3c5d7e9f1a2b"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.