删除
描述
object host.delete(array hosts)
该方法允许删除主机
参数
(array)
要删除的主机的ID.
返回值
(object)
返回值包含已删除主机ID的hostid
属性.
示例
删除多个主机
删除两个主机.
请求:
{
"jsonrpc": "2.0",
"method": "host.delete",
"params": [
"13",
"32"
],
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
响应:
{
"jsonrpc": "2.0",
"result": {
"hostids": [
"13",
"32"
]
},
"id": 1
}
来源
CHost::delete() in frontends/php/include/classes/api/services/CHost.php.