{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-crosswork/json-schema/cisco-crosswork-alarms-alarm-response-schema.json",
  "title": "Response object for any Alarm Center API",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-crosswork-alarms-api-openapi.yml#/components/schemas/alarmsAlarmResponse",
  "type": "object",
  "properties": {
    "state": {
      "$ref": "#/$defs/alarmsResponseState"
    },
    "Message": {
      "type": "string"
    },
    "eventId": {
      "type": "string"
    },
    "alarmId": {
      "type": "string"
    },
    "alarms": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/alarmsAlarm"
      }
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/alarmsEvent"
      }
    },
    "total": {
      "type": "string",
      "format": "int64"
    }
  },
  "$defs": {
    "alarmsAlarm": {
      "type": "object",
      "properties": {
        "AlarmId": {
          "type": "string",
          "title": "A unique uuid generated for the alarm"
        },
        "origin_service_id": {
          "type": "string",
          "title": "The origin service id of this event"
        },
        "origin_app_id": {
          "type": "string",
          "title": "The origin app id of this event"
        },
        "object_id": {
          "type": "string",
          "title": "The object/model identifier of the faulting event"
        },
        "object_description": {
          "type": "string",
          "title": "The description of the object/model identifier as it should be shown in the GUI"
        },
        "event_type": {
          "type": "integer",
          "format": "int32",
          "title": "Event Type for correlation"
        },
        "State": {
          "$ref": "#/$defs/alarmsSeverity",
          "description": "Current Alarm severity per the latest event."
        },
        "Description": {
          "type": "string",
          "description": "The alarm description per the latest event."
        },
        "Created": {
          "type": "string",
          "format": "int64",
          "title": "Time when the alarm was created"
        },
        "Updated": {
          "type": "string",
          "format": "int64",
          "title": "Time when the alarm was last updated"
        },
        "Closed": {
          "type": "string",
          "format": "int64",
          "title": "Time when the alarm was cleared"
        },
        "Acknowledge": {
          "type": "boolean",
          "format": "boolean",
          "title": "Was the alarm Acknowledge"
        },
        "AcknowledeBy": {
          "type": "string",
          "title": "Who acknowledge the alarm"
        },
        "AcknowledgeAt": {
          "type": "string",
          "format": "int64",
          "title": "When was the alarm acknowledge"
        },
        "Events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/alarmsEvent"
          },
          "title": "Events aggregated under the alarm"
        },
        "Alarms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/alarmsAlarm"
          },
          "title": "Alarms correlated to this alarm"
        },
        "AlarmCategory": {
          "$ref": "#/$defs/alarmsCategory",
          "title": "The Alarm Category"
        },
        "Notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/alarmsEvent"
          },
          "title": "Notes"
        },
        "AckHist": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/alarmsEvent"
          },
          "title": "Acknowledge History"
        },
        "events_count": {
          "type": "integer",
          "format": "int32",
          "title": "Number of events in this alarm"
        }
      },
      "title": "An Alarm that aggregates several Events & Alarms"
    },
    "alarmsCategory": {
      "type": "string",
      "enum": [
        "InvalidCategory",
        "System",
        "Network",
        "Audit",
        "Security",
        "External"
      ],
      "default": "InvalidCategory",
      "title": "Defines the Category of the Event/Alarm"
    },
    "alarmsEvent": {
      "type": "object",
      "properties": {
        "EventId": {
          "type": "string",
          "description": "Generated uuid to identify uniquely the event. Will be generated by the client lib."
        },
        "origin_service_id": {
          "type": "string",
          "title": "The origin service id of this event"
        },
        "origin_app_id": {
          "type": "string",
          "title": "The origin app id of this event"
        },
        "object_id": {
          "type": "string",
          "title": "The object/model identifier of the faulting event"
        },
        "object_description": {
          "type": "string",
          "title": "The description of the object/model identifier as it should be shown in the GUI"
        },
        "event_type": {
          "type": "integer",
          "format": "int32",
          "title": "Event Type for correlation"
        },
        "Timestamp": {
          "type": "string",
          "format": "int64",
          "description": "The time this event was created. Will be filled by the client lib."
        },
        "EventSeverity": {
          "$ref": "#/$defs/alarmsSeverity",
          "description": "The severity of the Event."
        },
        "Description": {
          "type": "string",
          "description": "A free text, parametrized, description. Do not need to fill if there is an event type..."
        },
        "DescriptionParams": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Parameters for the alarm description."
        },
        "CreateBy": {
          "type": "string",
          "description": "Who created the event, if the user acknowledge the alarm then the source is the same but the creator is not..."
        },
        "EventCategory": {
          "$ref": "#/$defs/alarmsCategory",
          "description": "The event category, e.g. system, network & etc."
        },
        "Flagging": {
          "type": "boolean",
          "format": "boolean",
          "title": "If the event is a flagging event, e.g. raise an alarm"
        }
      },
      "title": "An Event structure, an application/service will post this proto as an input\nfor the Alarm Center to create Events and Alarms"
    },
    "alarmsResponseState": {
      "type": "string",
      "enum": [
        "InvalidState",
        "Success",
        "Fail",
        "Partial"
      ],
      "default": "InvalidState",
      "title": "Indicate the outcome of the API operation response invoked on the Alarm Center"
    },
    "alarmsSeverity": {
      "type": "string",
      "enum": [
        "InvalidSeverity",
        "Clear",
        "Info",
        "Warning",
        "Minor",
        "Major",
        "Critical"
      ],
      "default": "InvalidSeverity",
      "title": "Defines the Event/Alarm severity"
    }
  }
}