OrkStageOrkStage
API referenceIncidents

POST /alert-rules

POST /alert-rules: OrkStage Control API v1 endpoint reference.

POST
/api/v1/alert-rules

Authorization

headerAuthorizationBearer <ork_<env>_<id>_<secret>>

Organization API key (scoped). Sessions use the cookie instead.

Header Parameters

x-orkstage-csrf?unknown

Cookie sessions: send "1" on POST/PATCH/PUT/DELETE. Not needed with an API key.

Request Body

application/json
  1. body
tenantId?string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
name*string
Length2 <= length <= 120
condition*|
severity?string
Default"medium"
Value in"low""medium""high""critical"
actions?array<>
Items1 <= items
Default
[  "create_incident",  "notify_owners"]
cooldownSeconds?integer
Range0 <= value <= 86400
Default900
autoResolve?boolean
Defaulttrue
enabled?boolean
Defaulttrue

Response Body

Example Request
curl -X POST 'http://localhost:4000/api/v1/alert-rules' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "condition": {    "signal": "health",    "consecutiveFailures": 1  }}'
Example Response201
Empty