API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen

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

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

Update an agent alert rule

Request Body

NameTypBeschreibung
namestring
enabledboolean
metricstring
operatorstring
thresholdnumber
severitystring
cooldownMinutesinteger
notifyChannelsstring[]

Pfad-Parameter

NameTypBeschreibung
ruleIderforderlichstring

Beispiel

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": []
});

Antwortcodes

HTTP Bedeutung
200 Default Response

Suche