Zabbix Documentation 5.2

Sidebar

删除

描述

object hostprototype.delete(array hostPrototypeIds)

该方法允许删除主机原型.

参数

(数组) 要删除主机原型的ID.

返回值

(对象)hostids属性中返回已删除主机原型ID的对象.

示例

删除多个主机原型

删除两个主机原型

请求:

{
           "jsonrpc": "2.0",
           "method": "hostprototype.delete",
           "params": [
               "10103",
               "10105"
           ],
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

响应:

{
           "jsonrpc": "2.0",
           "result": {
               "hostids": [
                   "10103",
                   "10105"
               ]
           },
           "id": 1
       }

来源

CHostPrototype::delete() in frontends/php/include/classes/api/services/CHostPrototype.php.