API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console

PATCH /v1/agents/alert-rules/{ruleId}

PATCH/v1/agents/alert-rules/{ruleId}

Update an agent alert rule

Request body

NameTypeDescription
namestring
enabledboolean
metricstring
operatorstring
thresholdnumber
severitystring
cooldownMinutesinteger
notifyChannelsstring[]

Path parameters

NameTypeDescription
ruleIdrequiredstring

Example

curl -X PATCH https://api.codemeta-os.de/v1/agents/alert-rules/{ruleId} \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "name": "string",
  "enabled": false,
  "metric": "cpuPercent",
  "operator": "gt",
  "threshold": 0,
  "severity": "critical",
  "cooldownMinutes": 0,
  "notifyChannels": []
}'
const result = await cm.agents.patch({
  "name": "string",
  "enabled": false,
  "metric": "cpuPercent",
  "operator": "gt",
  "threshold": 0,
  "severity": "critical",
  "cooldownMinutes": 0,
  "notifyChannels": []
});

Response codes

HTTP Meaning
200 Default Response

Search