{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-alert-event-schema.json",
  "title": "AlertEvent",
  "description": "One firing of an alert rule against a screen.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-alert-events-api-openapi.yml#/components/schemas/AlertEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Alert event id."
    },
    "code": {
      "type": "string",
      "description": "What fired, e.g. `connection-lost`, `display-off`, `storage-critical`."
    },
    "severity": {
      "type": "string",
      "description": "`info`, `warning` or `critical`."
    },
    "screenId": {
      "type": "string"
    },
    "screenName": {
      "type": "string",
      "description": "`(unknown screen)` if the screen is gone."
    },
    "message": {
      "type": "string"
    },
    "nextAction": {
      "type": "string",
      "description": "Suggested next step; may be empty."
    },
    "openedAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "closedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Null while open."
    },
    "detail": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ],
      "description": "Structured detail keyed by `kind` (`recovery`, `outage-history`, `network-unstable`, `display-off`), or null."
    }
  },
  "required": [
    "id",
    "code",
    "severity",
    "screenId",
    "screenName",
    "message",
    "nextAction",
    "openedAt",
    "closedAt",
    "detail"
  ]
}