{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-xdr/json-schema/cisco-xdr-event-bucket-schema.json",
  "title": "EventBucket",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-xdr-event-api-openapi.yml#/components/schemas/EventBucket",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64"
    },
    "from": {
      "type": "string",
      "format": "date-time"
    },
    "to": {
      "type": "string",
      "format": "date-time"
    },
    "owner": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartialEvent"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "count",
    "from",
    "to",
    "owner",
    "events"
  ],
  "$defs": {
    "PartialEvent": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Update"
          }
        },
        "type": {
          "type": "string",
          "enum": [
            "event"
          ]
        },
        "id": {
          "type": "string"
        },
        "tlp": {
          "type": "string",
          "enum": [
            "white",
            "green",
            "red",
            "amber"
          ]
        },
        "event_type": {
          "type": "string",
          "enum": [
            "record-created",
            "record-deleted",
            "record-updated"
          ]
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "entity": {
          "$ref": "#/$defs/Response116834EventsEntity"
        },
        "owner": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Response116834EventsEntity": {
      "type": "object",
      "additionalProperties": {}
    },
    "Response116834EventsFieldsChange": {
      "type": "object",
      "properties": {
        "before": {},
        "after": {}
      },
      "additionalProperties": false
    },
    "Update": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "action": {
          "type": "string",
          "enum": [
            "added",
            "deleted",
            "modified"
          ]
        },
        "change": {
          "$ref": "#/$defs/Response116834EventsFieldsChange"
        }
      },
      "additionalProperties": false,
      "required": [
        "field",
        "action",
        "change"
      ]
    }
  }
}