{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-customer-alerts-schema.json",
  "title": "CustomerAlerts",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-customer-alerts-api-openapi.yml#/components/schemas/CustomerAlerts",
  "type": "object",
  "required": [
    "customer_id",
    "alerts"
  ],
  "properties": {
    "customer_id": {
      "description": "Customer ID.",
      "type": "string"
    },
    "alerts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AlertView"
      }
    }
  },
  "$defs": {
    "AlertView": {
      "description": "View of alert in responses.",
      "type": "object",
      "required": [
        "id",
        "type",
        "severity",
        "createdAt",
        "details",
        "receivedAt",
        "tenant",
        "updatedAt",
        "category"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "type": {
          "type": "string"
        },
        "severity": {
          "description": "Alert severity level.",
          "enum": [
            "ok",
            "information",
            "warning",
            "error",
            "critical"
          ],
          "type": "string"
        },
        "affinity": {
          "description": "Alert synchronization affinity (e.g., agent ID).",
          "type": "string"
        },
        "createdAt": {
          "description": "A client-side date and time when alert was created. Equals to the `receivedAt` field if not set by client.",
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+){0,1}(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"
        },
        "deletedAt": {
          "description": "A date and time when the alert was dismissed.",
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+){0,1}(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"
        },
        "details": {
          "description": "Copy of context is merged to details.\nNull if details and context are empty.\n",
          "type": "object"
        },
        "receivedAt": {
          "description": "A server-side date and time when the alert was received.",
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+){0,1}(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"
        },
        "_source": {
          "description": "An identifier of the alert producer.",
          "type": "string"
        },
        "_sourceTimeStamp": {
          "type": "integer",
          "format": "int64"
        },
        "tenant": {
          "type": "object",
          "required": [
            "id",
            "locator"
          ],
          "properties": {
            "id": {
              "description": "An identifier of the alert owner.",
              "type": "string"
            },
            "locator": {
              "description": "Ascending hierarchy of tenant IDs separated by '/'.",
              "type": "string"
            }
          }
        },
        "updatedAt": {
          "description": "A date and time when the alert has been activated, deleted or dismissed.",
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+){0,1}(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"
        },
        "category": {
          "description": "Alert category.",
          "type": "string"
        },
        "falsePositive": {
          "description": "Specifies whether alert is false positive or not.",
          "type": "boolean"
        }
      }
    },
    "uuid": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
    }
  }
}