Skip to content
GridRouterhome

Search

Search providers, capabilities and pages

Docs
API referenceLogs, drains and alerts

Update an alert rule

PUT
/v1/alerts/rules/{id}

Change any field; fields you leave out keep their value. Changing what the rule measures resolves its open alerts.

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Match^alr_[a-z0-9]{8,32}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/alerts/rules/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "object": "alert_rule",  "id": "string",  "name": "string",  "description": "",  "enabled": true,  "metric": "error_rate",  "threshold": 0,  "window_s": 60,  "min_events": 1,  "severity": "info",  "scope": {},  "kinds": [],  "cooldown_s": 900,  "destination_ids": [],  "all_destinations": true,  "toast": true,  "muted_until": null,  "is_default": true,  "evaluator": "live",  "state": {    "status": "ok",    "last_evaluated_at": "2019-08-24T14:15:22Z",    "last_value": 0,    "open_alert_id": "string",    "note": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}