# Item object

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

### Item

::: noteclassic
Web items cannot be directly created, updated or deleted via
the Zabbix API.
:::

The item object has the following properties.

|Property|Type|Description|
|--------|----|-----------|
|itemid|string|*(readonly)* ID of the item.|
|**delay**<br>(required)|string|Update interval of the item. Accepts seconds or time unit with suffix and with or without one or more [custom intervals](/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.<br><br>Optional for Zabbix trapper or Dependent item.|
|**hostid**<br>(required)|string|ID of the host or template that the item belongs to.<br><br>For update operations this field is *readonly*.|
|**interfaceid**<br>(required)|string|ID of the item's host interface.<br><br>Not required for template items. Optional for Zabbix agent (active), Zabbix internal, Zabbix trapper, Dependent item, Zabbix aggregate, database monitor and calculated items.|
|**key\_**<br>(required)|string|Item key.|
|**name**<br>(required)|string|Name of the item.|
|**type**<br>(required)|integer|Type of the item.<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>8 - Zabbix aggregate;<br>9 - web item;<br>10 - external check;<br>11 - database monitor;<br>12 - IPMI agent;<br>13 - SSH agent;<br>14 - TELNET agent;<br>15 - calculated;<br>16 - JMX agent;<br>17 - SNMP trap;<br>18 - Dependent item|
|**value\_type**<br>(required)|integer|Type of information of the item.<br><br>Possible values:<br>0 - numeric float;<br>1 - character;<br>2 - log;<br>3 - numeric unsigned;<br>4 - text.|
|authtype|integer|SSH authentication method. Used only by SSH agent items.<br><br>Possible values:<br>0 - *(default)* password;<br>1 - public key.|
|description|string|Description of the item.|
|error|string|*(readonly)* Error text if there are problems updating the item.|
|flags|integer|*(readonly)* Origin of the item.<br><br>Possible values:<br>0 - a plain item;<br>4 - a discovered item.|
|history|string|A time unit of how long the history data should be stored. Also accepts user macro.<br><br>Default: 90d.|
|inventory\_link|integer|ID of the host inventory field that is populated by the item.<br><br>Refer to the [host inventory page](/manual/api/reference/host/object#host_inventory) for a list of supported host inventory fields and their IDs.<br><br>Default: 0.|
|ipmi\_sensor|string|IPMI sensor. Used only by IPMI items.|
|lastclock|timestamp|*(readonly)* Time when the item was last updated.<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions).|
|lastns|integer|*(readonly)* Nanoseconds when the item was last updated.<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions).|
|lastvalue|string|*(readonly)* Last value of the item.<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions).|
|logtimefmt|string|Format of the time in log entries. Used only by log items.|
|mtime|timestamp|Time when the monitored log file was last updated. Used only by log items.|
|params|string|Additional parameters depending on the type of the item:<br>- executed script for SSH and Telnet items;<br>- SQL query for database monitor items;<br>- formula for calculated items.|
|password|string|Password for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items.|
|port|string|Port monitored by the item. Used only by SNMP items.|
|prevvalue|string|*(readonly)* Previous value of the item.<br><br>This property will only return a value for the period configured in [ZBX\_HISTORY\_PERIOD](/manual/web_interface/definitions).|
|privatekey|string|Name of the private key file.|
|publickey|string|Name of the public key file.|
|snmp\_community|string|SNMP community. Used only by SNMPv1 and SNMPv2 items.|
|snmp\_oid|string|SNMP OID.|
|snmpv3\_authpassphrase|string|SNMPv3 auth passphrase. Used only by SNMPv3 items.|
|snmpv3\_authprotocol|integer|SNMPv3 authentication protocol. Used only by SNMPv3 items.<br><br>Possible values:<br>0 - *(default)* MD5;<br>1 - SHA.|
|snmpv3\_contextname|string|SNMPv3 context name. Used only by SNMPv3 items.|
|snmpv3\_privpassphrase|string|SNMPv3 priv passphrase. Used only by SNMPv3 items.|
|snmpv3\_privprotocol|integer|SNMPv3 privacy protocol. Used only by SNMPv3 items.<br><br>Possible values:<br>0 - *(default)* DES;<br>1 - AES.|
|snmpv3\_securitylevel|integer|SNMPv3 security level. Used only by SNMPv3 items.<br><br>Possible values:<br>0 - noAuthNoPriv;<br>1 - authNoPriv;<br>2 - authPriv.|
|snmpv3\_securityname|string|SNMPv3 security name. Used only by SNMPv3 items.|
|state|integer|*(readonly)* State of the item.<br><br>Possible values:<br>0 - *(default)* normal;<br>1 - not supported.|
|status|integer|Status of the item.<br><br>Possible values:<br>0 - *(default)* enabled item;<br>1 - disabled item.|
|templateid|string|(readonly) ID of the parent template item.<br><br>*Hint*: Use the `hostid` property to specify the template that the item belongs to.|
|trapper\_hosts|string|Allowed hosts. Used only by trapper items.|
|trends|string|A time unit of how long the trends data should be stored. Also accepts user macro.<br><br>Default: 365d.|
|units|string|Value units.|
|username|string|Username for authentication. Used by simple check, SSH, Telnet, database monitor and JMX items.<br><br>Required by SSH and Telnet items.|
|valuemapid|string|ID of the associated value map.|
|jmx\_endpoint|string|JMX agent custom connection string.<br><br>Default value:<br>service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi|
|master\_itemid|integer|Master item ID.<br>Recursion up to 3 dependent items and maximum count of dependent items equal to 999 are allowed.<br><br>Required by Dependent items.|

### Item preprocessing

The item preprocessing object has the following properties.

|Property|Type|Description|
|--------|----|-----------|
|**type**<br>(required)|integer|The preprocessing option type.<br><br>Possible values:<br>1 - Custom multiplier;<br>2 - Right trim;<br>3 - Left trim;<br>4 - Trim;<br>5 - Regular expression matching;<br>6 - Boolean to decimal;<br>7 - Octal to decimal;<br>8 - Hexadecimal to decimal;<br>9 - Simple change;<br>10 - Change per second.|
|**params**<br>(required)|string|Additional parameters used by preprocessing option. Multiple parameters are separated by LF (\\n) character.|
