{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argus-town/json-schema/argus-town-alert-rule-list-schema.json",
  "title": "AlertRuleList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argus-town-alerts-api-openapi.yml#/components/schemas/AlertRuleList",
  "type": "object",
  "required": [
    "object",
    "data",
    "has_more",
    "next_cursor"
  ],
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "list"
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AlertRule"
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": true,
  "$defs": {
    "AlertRule": {
      "type": "object",
      "required": [
        "object",
        "id",
        "type",
        "threshold",
        "connections",
        "enabled",
        "channel",
        "last_fired_at",
        "created_at"
      ],
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "alert_rule"
          ]
        },
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "threshold": {
          "type": "number"
        },
        "connections": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "Connection ids the rule watches; `null` means every connection."
        },
        "enabled": {
          "type": "boolean"
        },
        "channel": {
          "type": "string",
          "enum": [
            "email"
          ]
        },
        "last_fired_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    }
  }
}