{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/johnson-controls/main/json-schema/johnson-controls-alarm-schema.json",
  "title": "alarm",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/johnson-controls-metasys-openapi.yml#/components/schemas/alarm",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "The identifier of the alarm."
    },
    "itemReference": {
      "type": "string",
      "description": "The fully qualified reference of the object."
    },
    "name": {
      "type": "string",
      "description": "The name of the object."
    },
    "description": {
      "type": "string",
      "description": "A more detailed description of the triggered alarm, either describing\nthe object that triggered the alarm or the alarm itself.\n"
    },
    "activityManagementStatus": {
      "type": "string",
      "description": "The activity management status of this item.\n\nThe values of this property are described as follows:\n\n- `pending` - Indicates the activity has not yet been acted upon by a\n  user.\n- `acknowledged` - Indicates that the activity has been recognized and\n  viewed by a user.\n- `discarded` - Indicates that the activity has been acted upon or\n  deemed invalid by a user.\n",
      "enum": [
        "pending",
        "acknowledged",
        "discarded"
      ]
    },
    "discardedTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date-time representing the time when this activity message was\ndiscarded.\n",
      "format": "date-time"
    },
    "creationTime": {
      "type": "string",
      "description": "The date-time for when the alarm was detected.",
      "format": "date-time"
    },
    "acknowledgedTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date-time representing the time when this activity message was\nacknowledged.\n",
      "format": "date-time"
    },
    "objectUrl": {
      "type": "string",
      "description": "A link to the object from which this alarm was generated.",
      "format": "uri"
    },
    "message": {
      "type": "string",
      "description": "The alarm message."
    },
    "isAckRequired": {
      "type": "boolean",
      "description": "Indicates whether the alarm can be acknowledged. You will get an error\nresponse if you attempt to acknowledge an alarm for which this property\nis `false`.\n"
    },
    "type": {
      "type": "string",
      "description": "The type of alarm.\n\nThe values for this property come from the `alarmValueEnumSet` enumeration.\nFind the definition of `alarmValueEnumSet` at the relative URL of `/schemas/enums/alarmValueEnumSet`.\n\n**See also:**\n* [Get enumeration](#operation/getEnumerationAsJsonSchema) for more information on retrieving an enumeration.",
      "x-metasysType": "enum",
      "x-metasysEnum": "alarmValueEnumSet"
    },
    "priority": {
      "type": "integer",
      "description": "The priority of the alarm."
    },
    "category": {
      "type": "string",
      "description": "The authorization category of the object when the alarm was generated.\n\n\nThe values for this property come from the `objectCategoryEnumSet` enumeration.\nFind the definition of `objectCategoryEnumSet` at the relative URL of `/schemas/enums/objectCategoryEnumSet`.\n\n**See also:**\n* [Get enumeration](#operation/getEnumerationAsJsonSchema) for more information on retrieving an enumeration.",
      "x-metasysType": "enum",
      "x-metasysEnum": "objectCategoryEnumSet"
    },
    "annotationsUrl": {
      "type": "string",
      "description": "A link to the annotations available on the alarms.",
      "format": "uri"
    },
    "annotationsCount": {
      "type": "integer",
      "description": "The total number of annotations associated with the alarm."
    },
    "signedAnnotationsCount": {
      "type": "integer",
      "description": "The total number of MVE Annotations associated with the alarm.\n"
    },
    "self": {
      "type": "string",
      "description": "A link to this alarm.",
      "format": "uri"
    },
    "triggerValue": {
      "description": "The digital value of the attribute of the object on which the alarm was\ntriggered.\n",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "item": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "schema": {
              "type": "object"
            }
          },
          "required": [
            "item",
            "schema"
          ]
        },
        {
          "$ref": "#/$defs/anyDataTypeSchemaRequired"
        }
      ]
    },
    "spaces": {
      "type": "array",
      "description": "The collection of spaces associated with the object on which the\nactivity occurred.\n",
      "items": {
        "$ref": "#/$defs/space"
      }
    },
    "equipment": {
      "type": "array",
      "description": "The collection of equipment associated with the object on which the\nactivity occurred.\n",
      "items": {
        "$ref": "#/$defs/equipment"
      }
    },
    "alarmGeneratorObject": {
      "description": "Reference information to the object which generated the alarm.\n",
      "allOf": [
        {
          "$ref": "#/$defs/nullableObjectReferenceDefinition"
        }
      ]
    },
    "associatedGraphic": {
      "type": [
        "object",
        "null"
      ],
      "description": "Reference information for the graphic associated with the alarm.\n",
      "properties": {
        "reference": {
          "description": "Provides the fully qualified reference to the graphic associated\nwith the alarm.\n",
          "allOf": [
            {
              "$ref": "#/$defs/objectReferenceDefinition"
            }
          ]
        },
        "url": {
          "type": "string",
          "description": "A link to the associated alarm graphic.",
          "format": "uri"
        },
        "alias": {
          "type": "string",
          "description": "The object alias to apply to the associated alarm graphic.\n"
        },
        "aliasUrl": {
          "type": "string",
          "description": "A link to the associated alarm graphic resource, with the alias\ninformation included.\n",
          "format": "uri"
        }
      },
      "required": [
        "reference",
        "url",
        "alias",
        "aliasUrl"
      ]
    },
    "bacnet": {
      "type": "object",
      "x-releases": {
        "implementedAt": "14.1"
      },
      "description": "<span style=\"color: #92989b; font-size: 13px\">RELEASES</span>:<span style=\"color: #186faf;\"> <strong>14.1 and later</strong></span>\\\nBACnet calls this type of record an event notification. The properties under\nthis key are specific to BACnet event notifications. This property will only\nbe present on a BACnet Advanced Workstation site.\n",
      "properties": {
        "deviceId": {
          "type": "object",
          "x-metasysType": "bacOid",
          "properties": {
            "bacnetObjectType": {
              "type": "string",
              "x-metasysType": "enum",
              "x-metasysEnum": "objectTypeEnumSet",
              "description": "The values for this property come from the `objectTypeEnumSet` enumeration.\nFind the definition of `objectTypeEnumSet` at the relative URL of `/schemas/enums/objectTypeEnumSet`.\n\n**See also:**\n* [Get enumeration](#operation/getEnumerationAsJsonSchema) for more information on retrieving an enumeration."
            },
            "instance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4194302
            }
          },
          "description": "The BACoid of the device where the event initiated."
        },
        "objectId": {
          "type": "object",
          "x-metasysType": "bacOid",
          "properties": {
            "bacnetObjectType": {
              "type": "string",
              "x-metasysType": "enum",
              "x-metasysEnum": "objectTypeEnumSet",
              "description": "The values for this property come from the `objectTypeEnumSet` enumeration.\nFind the definition of `objectTypeEnumSet` at the relative URL of `/schemas/enums/objectTypeEnumSet`.\n\n**See also:**\n* [Get enumeration](#operation/getEnumerationAsJsonSchema) for more information on retrieving an enumeration."
            },
            "instance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4194302
            }
          },
          "description": "The BACoid of the object initiating the event."
        },
        "notificationClassId": {
          "description": "The notifier class that was responsible for distributing the alarm.\n",
          "properties": {
            "bacnetObjectType": {
              "type": "string",
              "enum": [
                "objectTypeEnumSet.bacNotificClass"
              ],
              "description": "Will always be the Notification Class"
            },
            "instance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4194302
            }
          }
        },
        "timestamp": {
          "description": "For devices with a clock this property will specify the time or date and\ntime of the alarm. For devices without a clock this will convey a\nsequence number that indicates the relative ordering of alarms. A BACnet\n\nCheck for the existence of the properties `time`, `dateTime` and\n`sequenceNumber` to determine which is used for an instance of alarm.\n",
          "oneOf": [
            {
              "type": "object",
              "title": "Time",
              "properties": {
                "time": {
                  "type": "string",
                  "format": "time",
                  "description": "The local time the alarm was generated. (The time is local with\nrespect to the device that generated the alarm.) An example\nvalue is `\"19:49:23\"`\n"
                }
              }
            },
            {
              "type": "object",
              "title": "Sequence Number",
              "properties": {
                "sequenceNumber": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 65535,
                  "description": "The sequence number associated with this alarm. An example is\n`345`\n"
                }
              }
            },
            {
              "type": "object",
              "title": "Date and Time",
              "properties": {
                "dateTime": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The local date and time when the alarm was generated. (The value\nis local with respect to the device that generated the alarm.)\nAn example value is `\"2024-10-11T19:49:23\"`\n"
                }
              }
            }
          ]
        },
        "notifyType": {
          "type": "string",
          "x-metasysType": "enum",
          "x-metasysEnum": "bacNotifyTypeEnumSet",
          "description": "The type of notification. This indicates if the notification is an\nalarm, an event or an acknowledgement. An example value is\n`bacNotifyTypeEnumSet.bacNotifyAlarm`\n\n\nThe values for this property come from the `bacNotifyTypeEnumSet` enumeration.\nFind the definition of `bacNotifyTypeEnumSet` at the relative URL of `/schemas/enums/bacNotifyTypeEnumSet`.\n\n**See also:**\n* [Get enumeration](#operation/getEnumerationAsJsonSchema) for more information on retrieving an enumeration."
        }
      }
    }
  },
  "required": [
    "id",
    "itemReference",
    "name",
    "description",
    "activityManagementStatus",
    "creationTime",
    "objectUrl",
    "message",
    "isAckRequired",
    "type",
    "priority",
    "category",
    "annotationsUrl",
    "annotationsCount",
    "self",
    "triggerValue",
    "discardedTime",
    "acknowledgedTime",
    "alarmGeneratorObject",
    "associatedGraphic"
  ],
  "$defs": {
    "anyDataTypeSchemaRequired": {
      "type": "object",
      "description": "A variant data type that can hold a value of any of the built-in data types of the Metasys object model.",
      "x-metasysType": "any",
      "properties": {
        "item": {},
        "schema": {
          "$ref": "#/$defs/dataTypeMetaSchema"
        }
      },
      "required": [
        "item",
        "schema"
      ]
    },
    "dataTypeMetaSchema": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "metasysType": {
          "type": "string",
          "enum": [
            "any",
            "array",
            "attributeReference",
            "bitString",
            "bacOid",
            "bool",
            "byte",
            "choice",
            "date",
            "double",
            "enum",
            "enumMemberId",
            "flags",
            "float",
            "list",
            "listof",
            "long",
            "none",
            "numeric",
            "objectReference",
            "octetString",
            "oid",
            "short",
            "string",
            "struct",
            "time",
            "ulong",
            "ushort"
          ]
        }
      },
      "additionalProperties": true
    },
    "equipment": {
      "type": "object",
      "description": "An equipment instance associated with the object on which the activity\noccurred.\n",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the equipment instance."
        },
        "itemReference": {
          "type": "string",
          "description": "The fully qualified reference of the equipment instance."
        },
        "equipmentName": {
          "type": "string",
          "description": "The name of the equipment instance."
        },
        "shortName": {
          "type": "string",
          "description": "The name of the mapped point."
        },
        "equipmentUrl": {
          "type": "string",
          "description": "The URL to the equipment instance.",
          "format": "uri"
        }
      },
      "required": [
        "id",
        "itemReference",
        "equipmentName",
        "shortName",
        "equipmentUrl"
      ]
    },
    "nullableObjectReferenceDefinition": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "A reference to an object in the system.",
      "properties": {
        "objectReference": {
          "type": "string",
          "description": "The fully qualified referenced of the object."
        },
        "referencedObject": {
          "type": "object",
          "description": "Meta-data about the referenced object.",
          "properties": {
            "objectName": {
              "type": "string",
              "description": "The name of the object."
            },
            "objectUrl": {
              "type": "string",
              "description": "A link to the object.",
              "format": "uri"
            }
          }
        }
      },
      "required": [
        "objectReference"
      ],
      "x-metasysType": "objectReference"
    },
    "objectReferenceDefinition": {
      "type": "object",
      "additionalProperties": false,
      "description": "A reference to an object in the system.",
      "properties": {
        "objectReference": {
          "type": "string",
          "description": "The fully qualified referenced of the object."
        },
        "referencedObject": {
          "type": "object",
          "description": "Meta-data about the referenced object.",
          "properties": {
            "objectName": {
              "type": "string",
              "description": "The name of the object."
            },
            "objectUrl": {
              "type": "string",
              "description": "A link to the object.",
              "format": "uri"
            }
          }
        }
      },
      "required": [
        "objectReference"
      ],
      "x-metasysType": "objectReference"
    },
    "space": {
      "type": "object",
      "description": "A space associated with the object on which the activity occurred.\n",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the space."
        },
        "itemReference": {
          "type": "string",
          "description": "The fully qualified reference of the space."
        },
        "name": {
          "type": "string",
          "description": "The name of the space."
        },
        "spaceUrl": {
          "type": "string",
          "description": "The URL to the space.",
          "format": "uri"
        }
      },
      "required": [
        "id",
        "itemReference",
        "name",
        "spaceUrl"
      ]
    }
  }
}