Update an alert rule
Changes a rule's name, cooldown, channels, or enabled state. Sending channelIds replaces the whole set. The event type cannot be changed, so create another rule instead.
Requires the manager role on the website and the alerting plan feature.
An OpenID Connect access token issued by Keycloak, acting as the signed-in user.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
New display name.
1 <= length <= 255How long to collect findings before sending, up to 24 hours. Everything found in that time arrives as one notification. Defaults to 900 seconds.
0 <= value <= 86400Replace the rule's settings, or send null to go back to the defaults. Per-rule settings, shaped by the event type: spike thresholds for a *:spike rule, a minimum severity for sbom:new-cve, the watched statuses for sbom:version-status. Rejected on any other type.
Channels to notify. They must belong to this website. An empty list means the rule detects but notifies nobody.
items <= 20Turn the rule on or off.
Response Body
application/json
curl -X PATCH "https://example.com/v1/workspaces/string/websites/string/alerts/rules/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "workspaceId": "string", "websiteId": "string", "name": "New third-party script", "eventType": "csp-violation:new-type", "cooldownSeconds": 0, "config": { "multiplier": 3, "floor": 50, "minSeverity": "medium", "statuses": [ "deprecated" ] }, "enabled": true, "channelIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}