2022 Zabbix中国峰会
2022 Zabbix中国峰会

template.delete

Description说明

object template.delete(array templateIds)

This method allows to delete templates此方法允许删除模板.

Parameters参数

(array) IDs of the templates to delete要删除的模板的ID.

Return values返回值

(object) Returns an object containing the IDs of the deleted templates under the templateids property. (object)返回一个对象,该对象包含templateids属性下删除的模板的ID.

Examples范例

Deleting multiple templates删除多个模板

Delete two templates删除两个模板.

Request请求:

{
           "jsonrpc": "2.0",
           "method": "template.delete",
           "params": [
               "13",
               "32"
           ],
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response响应:

{
           "jsonrpc": "2.0",
           "result": {
               "templateids": [
                   "13",
                   "32"
               ]
           },
           "id": 1
       }

Source来源

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