# > LLD rule object

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

### LLD rule

The low-level discovery rule object has the following properties.

|Property|Type|Description|
|--------|----|-----------|
|itemid|string|*(readonly)* ID of the LLD rule.|
|**delay**<br>(required)|string|Update interval of the LLD rule. Accepts seconds or time unit with suffix and with or without one or more [custom intervals](/fr/manual/config/items/item/custom_intervals) that consist of either flexible intervals and scheduling intervals as serialized strings. Also accepts user macros. Flexible intervals could be written as two macros separated by a forward slash. Intervals are separated by a semicolon.|
|**hostid**<br>(required)|string|ID of the host that the LLD rule belongs to.|
|**interfaceid**<br>(required)|string|ID of the LLD rule's host interface. Used only for host LLD rules.<br><br>Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper and database monitor LLD rules.|
|**key\_**<br>(required)|string|LLD rule key.|
|**name**<br>(required)|string|Name of the LLD rule.|
|**type**<br>(required)|integer|Type of the LLD rule.<br><br>Possible values:<br>0 - Zabbix agent;<br>1 - SNMPv1 agent;<br>2 - Zabbix trapper;<br>3 - simple check;<br>4 - SNMPv2 agent;<br>5 - Zabbix internal;<br>6 - SNMPv3 agent;<br>7 - Zabbix agent (active);<br>10 - external check;<br>11 - database monitor;<br>12 - IPMI agent;<br>13 - SSH agent;<br>14 - TELNET agent;<br>16 - JMX agent;<br>19 - HTTP agent;|
|**url**<br>(required)|string|URL string, required for HTTP agent LLD rule. Supports user macros, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {ITEM.ID}, {ITEM.KEY}.|
|allow\_traps|integer|HTTP agent LLD rule field. Allow to populate value as in trapper item type also.<br><br>0 - *(default)* Do not allow to accept incoming data.<br>1 - Allow to accept incoming data.|
|authtype|integer|Used only by SSH agent or HTTP agent LLD rules.<br><br>SSH agent authentication method possible values:<br>0 - *(default)* password;<br>1 - public key.<br><br>HTTP agent authentication method possible values:<br>0 - *(default)* none<br>1 - basic<br>2 - NTLM|
|description|string|Description of the LLD rule.|
|error|string|*(readonly)* Error text if there are problems updating the LLD rule.|
|follow\_redirects|integer|HTTP agent LLD rule field. Follow respose redirects while pooling data.<br><br>0 - Do not follow redirects.<br>1 - *(default)* Follow redirects.|
|headers|object|HTTP agent LLD rule field. Object with HTTP(S) request headers, where header name is used as key and header value as value.<br><br>Example:<br>{ "User-Agent": "Zabbix" }|
|http\_proxy|string|HTTP agent LLD rule field. HTTP(S) proxy connection string.|
|ipmi\_sensor|string|IPMI sensor. Used only by IPMI LLD rules.|
|jmx\_endpoint|string|JMX agent custom connection string.<br><br>Default value:<br>service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi|
|lifetime|string|Time period after which items that are no longer discovered will be deleted. Accepts seconds, time unit with suffix and user macro.<br><br>Default: `30d`.|
|output\_format|integer|HTTP agent LLD rule field. Should response converted to JSON.<br><br>0 - *(default)* Store raw.<br>1 - Convert to JSON.|
|params|string|Additional parameters depending on the type of the LLD rule:<br>- executed script for SSH and Telnet LLD rules;<br>- SQL query for database monitor LLD rules;<br>- formula for calculated LLD rules.|
|password|string|Password for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent LLD rules.|
|port|string|Port used by the LLD rule. Used only by SNMP LLD rules.|
|post\_type|integer|HTTP agent LLD rule field. Type of post data body stored in posts property.<br><br>0 - *(default)* Raw data.<br>2 - JSON data.<br>3 - XML data.|
|posts|string|HTTP agent LLD rule field. HTTP(S) request body data. Used with post\_type.|
|privatekey|string|Name of the private key file.|
|publickey|string|Name of the public key file.|
|query\_fields|array|HTTP agent LLD rule field. Query parameters. Array of objects with 'key':'value' pairs, where value can be empty string.|
|request\_method|integer|HTTP agent LLD rule field. Type of request method.<br><br>0 - GET<br>1 - *(default)* POST<br>2 - PUT<br>3 - HEAD|
|retrieve\_mode|integer|HTTP agent LLD rule field. What part of response should be stored.<br><br>0 - *(default)* Body.<br>1 - Headers.<br>2 - Both body and headers will be stored.<br><br>For request\_method HEAD only 1 is allowed value.|
|snmp\_community|string|SNMP community.<br><br>Required for SNMPv1 and SNMPv2 LLD rules.|
|snmp\_oid|string|SNMP OID.|
|snmpv3\_authpassphrase|string|SNMPv3 auth passphrase. Used only by SNMPv3 LLD rules.|
|snmpv3\_authprotocol|integer|SNMPv3 authentication protocol. Used only by SNMPv3 LLD rules.<br><br>Possible values:<br>0 - *(default)* MD5;<br>1 - SHA.|
|snmpv3\_contextname|string|SNMPv3 context name. Used only by SNMPv3 checks.|
|snmpv3\_privpassphrase|string|SNMPv3 priv passphrase. Used only by SNMPv3 LLD rules.|
|snmpv3\_privprotocol|integer|SNMPv3 privacy protocol. Used only by SNMPv3 LLD rules.<br><br>Possible values:<br>0 - *(default)* DES;<br>1 - AES.|
|snmpv3\_securitylevel|integer|SNMPv3 security level. Used only by SNMPv3 LLD rules.<br><br>Possible values:<br>0 - noAuthNoPriv;<br>1 - authNoPriv;<br>2 - authPriv.|
|snmpv3\_securityname|string|SNMPv3 security name. Used only by SNMPv3 LLD rules.|
|ssl\_cert\_file|string|HTTP agent LLD rule field. Public SSL Key file path.|
|ssl\_key\_file|string|HTTP agent LLD rule field. Private SSL Key file path.|
|ssl\_key\_password|string|HTTP agent LLD rule field. Password for SSL Key file.|
|state|integer|*(readonly)* State of the LLD rule.<br><br>Possible values:<br>0 - *(default)* normal;<br>1 - not supported.|
|status|integer|Status of the LLD rule.<br><br>Possible values:<br>0 - *(default)* enabled LLD rule;<br>1 - disabled LLD rule.|
|status\_codes|string|HTTP agent LLD rule field. Ranges of required HTTP status codes separated by commas. Also supports user macros as part of comma separated list.<br><br>Example: 200,200-{$M},{$M},200-400|
|templateid|string|(readonly) ID of the parent template LLD rule.|
|timeout|string|HTTP agent LLD rule field. Item data polling request timeout. Support user macros.<br><br>default: 3s<br>maximum value: 60s|
|trapper\_hosts|string|Allowed hosts. Used by trapper LLD rules or HTTP agent LLD rules.|
|username|string|Username for authentication. Used by simple check, SSH, Telnet, database monitor, JMX and HTTP agent LLD rules.<br><br>Required by SSH and Telnet LLD rules.|
|verify\_host|integer|HTTP agent LLD rule field. Validate host name in URL is in Common Name field or a Subject Alternate Name field of host certificate.<br><br>0 - *(default)* Do not validate.<br>1 - Validate.|
|verify\_peer|integer|HTTP agent LLD rule field. Validate is host certificate authentic.<br><br>0 - *(default)* Do not validate.<br>1 - Validate.|

### LLD rule filter

The LLD rule filter object defines a set of conditions that can be used
to filter discovered objects. It has the following properties:

|Property|Type|Description|
|--------|----|-----------|
|**conditions**<br>(required)|array|Set of filter conditions to use for filtering results.|
|**evaltype**<br>(required)|integer|Filter condition evaluation method.<br><br>Possible values:<br>0 - and/or;<br>1 - and;<br>2 - or;<br>3 - custom expression.|
|eval\_formula|string|*(readonly)* Generated expression that will be used for evaluating filter conditions. The expression contains IDs that reference specific filter conditions by its `formulaid`. The value of `eval_formula` is equal to the value of `formula` for filters with a custom expression.|
|formula|string|User-defined expression to be used for evaluating conditions of filters with a custom expression. The expression must contain IDs that reference specific filter conditions by its `formulaid`. The IDs used in the expression must exactly match the ones defined in the filter conditions: no condition can remain unused or omitted.<br><br>Required for custom expression filters.|

#### LLD rule filter condition

The LLD rule filter condition object defines a separate check to perform
on the value of an LLD macro. It has the following properties:

|Property|Type|Description|
|--------|----|-----------|
|**macro**<br>(required)|string|LLD macro to perform the check on.|
|**value**<br>(required)|string|Value to compare with.|
|formulaid|string|Arbitrary unique ID that is used to reference the condition from a custom expression. Can only contain capital-case letters. The ID must be defined by the user when modifying filter conditions, but will be generated anew when requesting them afterward.|
|operator|integer|Condition operator.<br><br>Possible values:<br>8 - *(default)* matches regular expression;<br>9 - does not match regular expression.|

::: notetip
To better understand how to use filters with various
types of expressions, see examples on the
[discoveryrule.get](get#retrieving_filter_conditions) and
[discoveryrule.create](create#using_a_custom_expression_filter) method
pages.
:::
