{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-update-alert-config-route-payload-schema.json",
  "title": "UpdateAlertConfigRoutePayload",
  "description": "The root node of the routing tree.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-observability-openapi.yml#/components/schemas/UpdateAlertConfigRoutePayload",
  "properties": {
    "continue": {
      "default": false,
      "description": "The continue parameter cannot be set to true on the root route because there are no subsequent sibling nodes to match. It must always be false.",
      "type": "boolean"
    },
    "groupBy": {
      "description": "The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.",
      "items": {
        "description": "As described",
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "type": "array"
    },
    "groupInterval": {
      "default": "5m",
      "description": "How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)\n`Additional Validators:`\n* must be a valid time format",
      "maxLength": 8,
      "minLength": 2,
      "type": "string"
    },
    "groupWait": {
      "default": "30s",
      "description": "How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)\n`Additional Validators:`\n* must be a valid time format",
      "maxLength": 8,
      "minLength": 2,
      "type": "string"
    },
    "match": {
      "deprecated": true,
      "description": "map of key:value. A set of equality matchers an alert has to fulfill to match the node. \n`Additional Validators:`\n* should not contain more than 5 keys\n* each key and value should not be longer than 200 characters\n* key and values should only include the characters: a-zA-Z0-9_./@&?:-",
      "type": "object"
    },
    "matchRe": {
      "deprecated": true,
      "description": "map of key:value. A set of regex-matchers an alert has to fulfill to match the node. \n`Additional Validators:`\n* should not contain more than 5 keys\n* each key and value should not be longer than 200 characters",
      "type": "object"
    },
    "matchers": {
      "description": "A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:\n* A valid Prometheus label name.\n* One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.\n* A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.\n`Additional Validators:`\n* should not contain more than 5 keys\n* each key and value should not be longer than 200 characters",
      "items": {
        "description": "Item of matchers",
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "type": "array"
    },
    "receiver": {
      "description": "Receiver that should be one item of receivers\n`Additional Validators:`\n* must be a in name of receivers",
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "repeatInterval": {
      "default": "4h",
      "description": "How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).\n`Additional Validators:`\n* must be a valid time format",
      "maxLength": 8,
      "minLength": 2,
      "type": "string"
    },
    "routes": {
      "description": "Zero or more child routes.",
      "items": {
        "description": "As in one level above",
        "properties": {
          "continue": {
            "default": false,
            "description": "Whether an alert should continue matching subsequent sibling nodes.",
            "type": "boolean"
          },
          "groupBy": {
            "items": {
              "description": "As in one level above",
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "type": "array"
          },
          "groupInterval": {
            "description": "As in one level above",
            "maxLength": 8,
            "minLength": 2,
            "type": "string"
          },
          "groupWait": {
            "description": "As in one level above",
            "maxLength": 8,
            "type": "string"
          },
          "match": {
            "deprecated": true,
            "description": "As in one level above",
            "type": "object"
          },
          "matchRe": {
            "deprecated": true,
            "description": "As in one level above",
            "type": "object"
          },
          "matchers": {
            "description": "As in one level above",
            "items": {
              "description": "Item of matchers",
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "type": "array"
          },
          "receiver": {
            "description": "As in one level above",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "repeatInterval": {
            "description": "As in one level above",
            "maxLength": 8,
            "minLength": 2,
            "type": "string"
          },
          "routes": {
            "description": "Another child routes",
            "items": {
              "description": "As in one level above",
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "receiver"
  ],
  "type": "object"
}