Cloady Docs
API ReferenceEndpointsApplications

Change an alert rule

Changes the threshold, durations, notifications or the on/off switch. Turning a rule off silences it, so it stops notifying and leaves the status page.

PATCH
/api/workspaces/{workspaceSlug}/apps/{appSlug}/alerts/{alertId}
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string
alertId*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The metric and the service stay as created; delete the rule and create another to change them

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/workspaces/string/apps/string/alerts/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "alert": {    "id": "string",    "service": "string",    "metric": "p95",    "comparison": ">",    "threshold": 0,    "window": "2m",    "for": "1m",    "email": true,    "channels": [      "string"    ],    "statusPage": true,    "enabled": true,    "state": "ok",    "open": [      {        "service": "string",        "state": "pending",        "since": "string",        "value": 0      }    ],    "lastFiredAt": "string",    "evaluatedAt": "string",    "sentence": "string",    "query": "string",    "createdAt": "string"  }}