usermacro.delete

说明

object usermacro.delete(array hostMacroIds)

Description

object usermacro.delete(array hostMacroIds)

This method allows to delete host macros.

参数

(array) 要删除的主机宏的ID。

Parameters

(array) IDs of the host macros to delete.

返回值

(object)返回一个包含“hostMacs”属性下删除的主机宏ID的对象。

Return values

(object) Returns an object containing the IDs of the deleted host macros under the hostmacroids property.

示例

Examples

删除多个主机宏

删除2个主机宏

Deleting multiple host macros

Delete two host macros.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "usermacro.delete",
  4. "params": [
  5. "32",
  6. "11"
  7. ],
  8. "auth": "3a57200802b24cda67c4e4010b50c065",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "hostmacroids": [
  5. "32",
  6. "11"
  7. ]
  8. },
  9. "id": 1
  10. }

来源

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