[comment]: # translation:outdated

[comment]: # ({293a482d-293a482d})
# 删除

[comment]: # ({/293a482d-293a482d})

[comment]: # ({e3f7b3a0-1760a96c})
### 描述

`object discoveryrule.delete(array lldRuleIds)`

此方法允许删除 LLD 规则。

::: noteclassic
此方法只有 *Admin(管理员)* 和 *Super admin(超级管理员)* 用户可用。可以在用户角色设置中撤销调用该方法的权限。更多信息请查看[用户角色](/manual/web_interface/frontend_sections/users/user_roles)。
:::

[comment]: # ({/e3f7b3a0-1760a96c})

[comment]: # ({27340eaa-27340eaa})
### 参数

`(array)` 要删除的 LLD 规则的 ID。

[comment]: # ({/27340eaa-27340eaa})

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

`(object)` 返回一个对象，其中包含在`ruleids`属性下删除的LLD规则的IDs。

[comment]: # ({/36803485-ae1ac187})

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

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

[comment]: # ({a2d19e6d-98660baf})
#### 删除多条 LLD 规则

删除两条 LLD 规则。

[请求](/manual/api#performing-requests)：

```json
{
    "jsonrpc": "2.0",
    "method": "discoveryrule.delete",
    "params": [
        "27665",
        "27668"
    ],
    "id": 1
}
```

响应：

```json
{
    "jsonrpc": "2.0",
    "result": {
        "ruleids": [
            "27665",
            "27668"
        ]
    },
    "id": 1
}
```

[comment]: # ({/a2d19e6d-98660baf})

[comment]: # ({76a51bc0-76a51bc0})
### 来源

CDiscoveryRule::delete() in
*ui/include/classes/api/services/CDiscoveryRule.php*.

[comment]: # ({/76a51bc0-76a51bc0})
