{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coralogix/json-schema/coralogix-get-alert-event-response-schema.json",
  "title": "Get alert event response",
  "description": "Response containing the details of an alert event.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coralogix-alert-events-service-api-openapi.yml#/components/schemas/GetAlertEventResponse",
  "type": "object",
  "oneOf": [
    {
      "required": [
        "singlePermutation"
      ],
      "type": "object"
    },
    {
      "required": [
        "multiplePermutation"
      ],
      "type": "object"
    },
    {
      "type": "object",
      "not": {
        "anyOf": [
          {
            "required": [
              "singlePermutation"
            ],
            "type": "object"
          },
          {
            "required": [
              "multiplePermutation"
            ],
            "type": "object"
          }
        ]
      }
    }
  ],
  "properties": {
    "id": {
      "description": "Unique identifier of the alert event.",
      "maxLength": 36,
      "minLength": 1,
      "pattern": "^[\\s\\S]*$",
      "type": "string",
      "x-coralogix-presence": true
    },
    "multiplePermutation": {
      "$ref": "#/$defs/AlertEventMultiplePermutation"
    },
    "pagination": {
      "$ref": "#/$defs/alerts.v3.PaginationResponse"
    },
    "singlePermutation": {
      "$ref": "#/$defs/AlertEvent"
    }
  },
  "$defs": {
    "ActivityAnalysis": {
      "title": "Activity analysis data structure",
      "type": "object",
      "properties": {
        "rules": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "List of rules."
          },
          "description": "List of rules."
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/ActivityAnalysisStatus"
            }
          ],
          "description": "Status."
        }
      },
      "description": "Configuration for alert activity analysis, containing rules and status."
    },
    "ActivityAnalysisStatus": {
      "enum": [
        "ACTIVITY_ANALYSIS_STATUS_ACTIVATE_OR_UNSPECIFIED",
        "ACTIVITY_ANALYSIS_STATUS_MUTE"
      ],
      "type": "string",
      "description": "Activity analysis status."
    },
    "AlertEvent": {
      "title": "Alert event",
      "type": "object",
      "properties": {
        "activityAnalysis": {
          "$ref": "#/$defs/ActivityAnalysis"
        },
        "alertId": {
          "description": "Unique identifier of the alert.",
          "maxLength": 36,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "groupLabels": {
          "type": "object",
          "additionalProperties": {
            "minLength": 0,
            "type": "string"
          },
          "description": "Labels for the group."
        },
        "incidentCorrelationKey": {
          "description": "Key used to correlate incidents.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "payload": {
          "type": "object",
          "description": "Raw payload data."
        },
        "payloadType": {
          "description": "Type of the payload.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "permutationId": {
          "description": "Unique identifier of the permutation.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "permutationLabels": {
          "type": "object",
          "additionalProperties": {
            "minLength": 0,
            "type": "string"
          },
          "description": "Labels for the permutation."
        },
        "preGroupingEventId": {
          "description": "Identifier of the event before grouping.",
          "maxLength": 256,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertStatus"
            }
          ],
          "description": "Status."
        },
        "timestamp": {
          "description": "Timestamp of the event.",
          "format": "date-time",
          "maxLength": 64,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Alert event."
    },
    "AlertEventMultiplePermutation": {
      "type": "object",
      "properties": {
        "alertEventMultiplePermutation": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertEvent"
          },
          "description": "List of alert events for multiple permutations."
        }
      },
      "description": "Alert event multiple permutation."
    },
    "AlertStatus": {
      "enum": [
        "ALERT_STATUS_RESOLVED_OR_UNSPECIFIED",
        "ALERT_STATUS_TRIGGERED",
        "ALERT_STATUS_NO_DATA"
      ],
      "type": "string",
      "description": "Alert status."
    },
    "alerts.v3.PaginationResponse": {
      "type": "object",
      "properties": {
        "nextPageToken": {
          "description": "Token for fetching the next page of results.",
          "maxLength": 4096,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "totalSize": {
          "description": "Total number of results.",
          "format": "int64",
          "maximum": 4294967295,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        }
      },
      "description": "Pagination response."
    }
  }
}