[comment]: # translation:outdated

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

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

[comment]: # ({38b988e0-6a90d1d2})
### 描述

`object hostinterface.delete(array hostInterfaceIds)`

该方法允许删除主机接口。

::: noteclassic
此方法仅适用于 *Admin* 和 *Super admin* 用户类型。调用该方法的权限可在用户角色设置中撤销。更多信息请参阅 [用户角色](/manual/web_interface/frontend_sections/users/user_roles)。
:::

[comment]: # ({/38b988e0-6a90d1d2})

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

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

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

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

`(object)` 返回一个对象，其中在 `interfaceids` 属性下包含已删除主机接口的 ID。

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

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

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

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

删除 ID 为 30062 的主机接口。

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

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

响应：

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

[comment]: # ({/664e15f5-91934c15})

[comment]: # ({a3d1e725-a3d1e725})
### 另见

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

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

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

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

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