List alert rules
Lists what this website notifies about. A rule pairs an event type with the channels to notify and a cooldown that batches findings, so a burst of similar events becomes one message instead of many.
Requires the viewer 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
Query Parameters
The nextCursor of the previous page. Omit it to start from the beginning. A cursor encodes a position and is not meant to be built by hand.
How many items to return, from 1 to 200.
1 <= value <= 20050Match part of the rule name.
length <= 255Only enabled or only disabled rules.
What to notify about. new-* types fire the first time something appears in a website's reports: a CSP directive and blocked origin pair, a script origin, a failing network origin, a COOP or COEP violation type, a Permissions Policy violation, a deprecated API, a browser intervention, or a blocked connection origin. compliance:unjustified-script fires when a payment-page script needs review. *:spike types fire when an hour's report volume reaches at least 50 reports and three times the trailing 24-hour average, both adjustable per rule with config.
Response Body
application/json
curl -X GET "https://api-next.centralcsp.com/v1/workspaces/string/websites/string/alerts/rules?limit=50"{ "data": [ { "id": "string", "workspaceId": "string", "websiteId": "string", "name": "New third-party script", "eventType": "csp-violation:new-type", "cooldownSeconds": 0, "config": { "multiplier": 3, "floor": 50 }, "enabled": true, "channelIds": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "pagination": { "nextCursor": "string", "hasMore": true, "total": 0 }}Send a test alert POST
Sends a sample notification through the channel right away and reports what happened. Use it to check a webhook URL or chat integration before you rely on it.
Create an alert rule POST
Starts notifying on an event type through the channels you list, which must belong to this website.