This method allows to update existing items. 此方法允许更新已存在的监控项。

    Web items cannot be updated via the Zabbix API. WEB监控项不能通过Zabbix API更新。

    (object/array) Item properties to be updated. (object/array)要更新的监控项的属性。

    The itemid property must be defined for each item, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged. 每个的监控项的itemid属性必须被定义,其他属性可选。只有被传递的属性才会更新,其他所有属性保持不变。

    (object) Returns an object containing the IDs of the updated items under the itemids property. (object)itemids属性下返回已被更新的监控项的对象的IDs。

    Enabling an item 启用一个监控项

    Enable an item, that is, set its status to “0”. 启用一个监控项就是设置他的status属性为“0”。

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "10092"
    5. ]
    6. },
    7. "id": 1
    8. }

    Update dependent item 更新依赖监控项

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "itemids": [
    5. "189019"
    6. ]
    7. "id": 1
    8. }

    Update HTTP agent item 更新 HTTP agent 监控项

    Enable item value trapping. 启用监控项的trapping值。

    Request:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "itemids": [
    5. "23856"
    6. ]
    7. },
    8. "id": 1
    9. }

    CItem::update() in frontends/php/include/classes/api/services/CItem.php.