keelwave
API Referenceadmin/alert-rules

Preview an unsaved alert rule

POST
/admin/orgs/{orgID}/projects/{projectID}/alert-rules/preview

Evaluates a draft rule's signal over its window right now and reports whether the threshold would breach. Aggregate signals only.

Path Parameters

orgID*string

Organization UUID

projectID*string

Project UUID

Request Body

application/json

Draft rule

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/admin/orgs/string/projects/string/alert-rules/preview" \  -H "Content-Type: application/json" \  -d '{    "comparator": "string",    "signal": "run_failure"  }'
{  "sample_count": 0,  "scope_label": "string",  "value": 0,  "would_breach": true}