Rule overrides

Endpoint: /api/metrics/rule-overrides/

An override is one server’s departure from an alert rule it’s attached to: its own threshold, recovery threshold, or duration, or an exemption from the rule entirely. It doesn’t change the rule for any other server. There’s no console for this yet—this API is the only way to set one. See Monitoring rules for how overrides fit into how a rule fires.

Requires the Metrics extension to be enabled for the workspace, and only reaches servers the credential can already manage—naming any other server is answered as not found.

List rule overrides

Retrieve a paginated list of rule overrides.

Request

GET /api/metrics/rule-overrides/

Query parameters

ParameterTypeDescription
serverUUIDFilter by server ID
ruleUUIDFilter by alert rule ID
enabledbooleanFilter by whether the override is active (false is the exemption)
searchstringSearch across server name and rule name
orderingstringSort order (e.g., added_at, -updated_at). Default: -added_at
pageintegerPage number
page_sizeintegerResults per page (default: 15, max: 100)

Response

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "server": {
        "id": "7e3984de-49ab-4cc6-bcdf-21fbd35858b8",
        "name": "web-server-01",
        "os": "Ubuntu 22.04",
        "is_connected": true
      },
      "rule": "8c4d6e2a-1b3f-4a5c-8d9e-0f1a2b3c4d5e",
      "threshold": 90,
      "recovery_threshold": 80,
      "duration_s": null,
      "enabled": true,
      "added_at": "2026-09-10T09:00:00Z",
      "updated_at": "2026-09-10T09:00:00Z"
    }
  ]
}

Required scope: rule_override:read

Example

curl -X GET "https://your-workspace.us1.alpacon.io/api/metrics/rule-overrides/?server=7e3984de-49ab-4cc6-bcdf-21fbd35858b8" \
  -H "Authorization: token=\"alpat-xxxxxxxxxxxxxxxxxx\""

Error responses

StatusError codeDescription
400metrics_alert_rule_recovery_threshold_invalidThe effective recovery_threshold is not on the recovering side of the effective threshold
400INVALID_REQUESTA server already has an override for this rule, or server or rule doesn’t resolve
401UNAUTHORIZEDInvalid or missing authentication
403FORBIDDENInsufficient permissions, or the Metrics extension isn’t enabled for this workspace
404NOT_FOUNDOverride not found, or server names one this credential can’t manage
Last updated: