[comment]: # translation:outdated

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

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

[comment]: # ({1bafca7b-6a90d1d2})
### 描述

`object hostinterface.delete(hostInterfaceIds数组)`

该方法允许删除主机接口

::: noteclassic
该方法适用于*管理员*和*超级管理员*用户类型。可以在用户角色设置中撤销调用该方法的权限。有关详细信息，参阅[用户角色](/manual/web_interface/frontend_sections/administration/user_roles)。
:::

[comment]: # ({/1bafca7b-6a90d1d2})

[comment]: # ({617ba57c-617ba57c})
### 参数

要删除主机接口的`(数组)`ID。

[comment]: # ({/617ba57c-617ba57c})

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

`(object)` 在`interfaceids`属性中返回已删除主机接口ID对象。

[comment]: # ({/61a8b976-61a8b976})

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

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

[comment]: # ({4bf774b3-91934c15})
#### 删除一个主机接口

删除ID为30062的主机接口.

请求:

```json
{
    "jsonrpc": "2.0",
    "method": "hostinterface.delete",
    "params": [
        "30062"
    ],
    "auth": "3a57200802b24cda67c4e4010b50c065",
    "id": 1
}
```

响应:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "interfaceids": [
            "30062"
        ]
    },
    "id": 1
}
```

[comment]: # ({/4bf774b3-91934c15})

[comment]: # ({a3d1e725-a3d1e725})
### 参考

-   [hostinterface.massremove](massremove)
-   [host.massremove](/manual/api/reference/host/massremove)

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

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

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

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