Sidebar

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

script.delete

说明

object script.delete(array scriptIds)

这个方法运行删除脚本。

参数

(array) 要删除的脚本ID。

返回值

(object) Returns an object containing the IDs of the deleted scripts under the scriptids property. (object) 返回一个包含被删除脚本ID的对象。

Examples范例

Delete multiple scripts删除多个脚本

Delete two scripts删除两个脚本.

Request请求:

{
           "jsonrpc": "2.0",
           "method": "script.delete",
           "params": [
               "3",
               "4"
           ],
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

Response响应:

{
           "jsonrpc": "2.0",
           "result": {
               "scriptids": [
                   "3",
                   "4"
               ]
           },
           "id": 1
       }

Source源码

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