[comment]: # translation:outdated

[comment]: # ({1b9515ab-1b9515ab})
# itemprototype.delete

[comment]: # ({/1b9515ab-1b9515ab})

[comment]: # ({88b4accc-ee2fdfa0})
### 描述

`object itemprototype.delete(array itemPrototypeIds)`

此方法允许 delete 监控项原型。

::: noteclassic
此方法仅适用于 *管理员* 和 *超级管理员* 用户类型。可以在用户角色设置中撤销调用该方法的权限。更多信息请参见 [User
roles](/manual/web_interface/frontend_sections/users/user_roles)。
:::

[comment]: # ({/88b4accc-ee2fdfa0})

[comment]: # ({7755a7b3-7755a7b3})
### 参数

`(array)` 要删除的 监控项原型 的 IDs。

[comment]: # ({/7755a7b3-7755a7b3})

[comment]: # ({db63ca62-db63ca62})
### 返回值

`(object)` 返回一个 object，其中包含已删除的 监控项 原型的 ID，这些 ID 位于 `prototypeids` 属性下。

[comment]: # ({/db63ca62-db63ca62})

[comment]: # ({b41637d2-b41637d2})
### 示例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({f0b002c2-0c135019})
#### 删除多个 监控项原型

删除两个 监控项原型。  
如果主 监控项 或  
监控项 原型被删除，依赖的 监控项原型 将自动被移除。

[执行请求](/manual/api#执行请求):


```json
{
    "jsonrpc": "2.0",
    "method": "itemprototype.delete",
    "params": [
        "27352",
        "27356"
    ],
    "id": 1
}
```
响应:


```json
{
    "jsonrpc": "2.0",
    "result": {
        "prototypeids": [
            "27352",
            "27356"
        ]
    },
    "id": 1
}
```

[comment]: # ({/f0b002c2-0c135019})

[comment]: # ({8cee4f1f-8cee4f1f})
### 来源

CItemPrototype::delete() 函数位于
*ui/include/classes/api/services/CItemPrototype.php* 文件中。

[comment]: # ({/8cee4f1f-8cee4f1f})
