{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-enterprise-linux-8/json-schema/red-hat-enterprise-linux-8-rule-export-schema.json",
  "title": "RuleExport",
  "description": "Rule information for export.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-advisor-api-openapi.yml#/components/schemas/RuleExport",
  "type": "object",
  "properties": {
    "rule_id": {
      "type": "string",
      "description": "Rule ID from Insights",
      "maxLength": 240
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "deleted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "description": {
      "type": "string",
      "maxLength": 240
    },
    "active": {
      "type": "boolean"
    },
    "category": {
      "type": "string"
    },
    "impact": {
      "type": "string"
    },
    "likelihood": {
      "type": "integer",
      "maximum": 32767,
      "minimum": 0
    },
    "node_id": {
      "type": "string",
      "description": "KCS solution number",
      "maxLength": 10
    },
    "tags": {
      "type": "string",
      "readOnly": true
    },
    "playbook_count": {
      "type": "integer"
    },
    "reboot_required": {
      "type": "boolean"
    },
    "publish_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "summary": {
      "type": "string"
    },
    "generic": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "more_info": {
      "type": "string"
    },
    "impacted_systems_count": {
      "type": "integer"
    },
    "rule_status": {
      "type": "string",
      "readOnly": true
    },
    "resolution_set": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Resolution"
      }
    },
    "total_risk": {
      "type": "integer",
      "maximum": 32767,
      "minimum": 0
    },
    "hosts_acked_count": {
      "type": "integer"
    },
    "rating": {
      "type": "integer",
      "readOnly": true
    },
    "reports_shown": {
      "type": "boolean",
      "readOnly": true
    }
  },
  "required": [
    "category",
    "created_at",
    "deleted_at",
    "description",
    "generic",
    "hosts_acked_count",
    "impact",
    "impacted_systems_count",
    "playbook_count",
    "rating",
    "reason",
    "reports_shown",
    "resolution_set",
    "rule_id",
    "rule_status",
    "summary",
    "tags",
    "updated_at"
  ],
  "$defs": {
    "Resolution": {
      "type": "object",
      "properties": {
        "system_type": {
          "type": "integer"
        },
        "resolution": {
          "type": "string"
        },
        "resolution_risk": {
          "allOf": [
            {
              "$ref": "#/$defs/ResolutionRisk"
            }
          ],
          "readOnly": true
        },
        "has_playbook": {
          "type": "boolean",
          "readOnly": true
        }
      },
      "required": [
        "has_playbook",
        "resolution",
        "resolution_risk",
        "system_type"
      ]
    },
    "ResolutionRisk": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "risk": {
          "type": "integer",
          "maximum": 32767,
          "minimum": 0
        }
      }
    }
  }
}