[comment]: # aside:1

[comment]: # ({195463c3-8bbba5df})
# Trigger object

The following objects are directly related to the `trigger` API.

[comment]: # ({/195463c3-8bbba5df})

[comment]: # ({44461ee2-db828bca})
### Trigger

The trigger object has the following properties.

|Property|[Type](/manual/api/reference_commentary#data-types)|Description|
|--|--|------|
|triggerid|ID|ID of the trigger.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*<br>- *required* for update operations|
|description|string|Name of the trigger.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *required* for create operations|
|expression|string|Trigger expression.<br><br>Items with `value_type` set to `5` (binary) cannot be used in trigger expressions.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *required* for create operations|
|event\_name|string|Event name generated by the trigger.|
|opdata|string|Operational data.|
|comments|string|Additional description of the trigger.|
|error|string|Error text if there have been any problems when updating the state of the trigger.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|flags|integer|[Origin](/manual/api/reference_commentary#entity-origin-flags) of the trigger.<br><br>Possible values:<br>0 - *(default)* a plain trigger;<br>4 - a trigger converted from prototype.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|lastchange|timestamp|Time when the trigger last changed its state.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|priority|integer|Severity of the trigger.<br><br>Possible values:<br>0 - *(default)* not classified;<br>1 - information;<br>2 - warning;<br>3 - average;<br>4 - high;<br>5 - disaster.|
|state|integer|State of the trigger.<br><br>Possible values:<br>0 - *(default)* trigger state is up to date;<br>1 - current trigger state is unknown.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|status|integer|Whether the trigger is enabled or disabled.<br><br>Possible values:<br>0 - *(default)* enabled;<br>1 - disabled.|
|templateid|ID|ID of the parent template trigger.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|type|integer|Whether the trigger can generate multiple problem events.<br><br>Possible values:<br>0 - *(default)* do not generate multiple events;<br>1 - generate multiple events.|
|url|string|URL associated with the trigger.|
|url_name|string|Label for the URL associated with the trigger.|
|value|integer|Whether the trigger is in OK or problem state.<br><br>Possible values:<br>0 - *(default)* OK;<br>1 - problem.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *read-only*|
|recovery\_mode|integer|OK event generation mode.<br><br>Possible values:<br>0 - *(default)* Expression;<br>1 - Recovery expression;<br>2 - None.|
|recovery\_expression|string|Trigger recovery expression.<br><br>Items with `value_type` set to `5` (binary) cannot be used in trigger recovery expressions.|
|correlation\_mode|integer|OK event closes.<br><br>Possible values:<br>0 - *(default)* All problems;<br>1 - All problems if tag values match.|
|correlation\_tag|string|Tag for matching.|
|manual\_close|integer|Allow manual close.<br><br>Possible values:<br>0 - *(default)* No;<br>1 - Yes.|
|uuid|string|Universal unique identifier, used for linking imported triggers to already existing ones. Auto-generated, if not given.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *supported* if the trigger belongs to a template|

[comment]: # ({/44461ee2-db828bca})

[comment]: # ({5a130da9-0188f389})
### Trigger tag

The trigger tag object has the following properties.

|Property|[Type](/manual/api/reference_commentary#data-types)|Description|
|--|--|------|
|tag|string|Trigger tag name.<br><br>[Property behavior](/manual/api/reference_commentary#property-behavior):<br>- *required*|
|value|string|Trigger tag value.|

[comment]: # ({/5a130da9-0188f389})
