item.delete

Description 说明

object item.delete(array itemIds)

This method allows to delete items.此方法允许删除项目。

Web items cannot be deleted via the Zabbix API.Web项无法通过Zabbix API进行删除。

Parameters 参数

(array) IDs of the items to delete.要删除的项的ID。

Return values 返回值

(object) Returns an object containing the IDs of the deleted items under the itemids property.返回包含“itemid”属性下的已删除项的ID的对象

Examples 示例

Deleting multiple items 删除多个items

Delete two items.删除两个items

Request:

{
           "jsonrpc": "2.0",
           "method": "item.delete",
           "params": [
               "22982",
               "22986"
           ],
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "itemids": [
                   "22982",
                   "22986"
               ]
           },
           "id": 1
       }

Source 来源

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