object template.massremove(object parameters)
このメソッドで、関連するオブジェクトを複数のテンプレートから削除できます。
このメソッドはAdminおよびSuper adminユーザータイプでのみ使用できます。 メソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。 詳細についてはユーザーの役割を参照してください。
(object) 更新するテンプレートの ID と削除する必要があるオブジェクトを含むパラメーター。
| パラメータ | タイプ | 説明 | 
|---|---|---|
| templateids (必須) | string/array | 更新するテンプレートの ID。 | 
| groupids | string/array | 特定のテンプレートを削除するホスト グループ。 | 
| macros | string/array | 指定されたテンプレートから削除するユーザー マクロ。 | 
| templateids_clear | string/array | 指定されたテンプレート (上流) からリンクを解除してクリアするテンプレート。 | 
| templateids_link | string/array | 指定されたテンプレート (上流) からリンクを解除するテンプレート。 | 
(object) templateids プロパティの下で更新されたテンプレートの ID を含むオブジェクトを返します。
グループ"2"から 2 つのテンプレートを削除します
Request:
{
           "jsonrpc": "2.0",
           "method": "template.massremove",
           "params": {
               "templateids": [
                   "10085",
                   "10086"
               ],
               "groupids": "2"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }Response:
Unlink templates "10106" and "10104" from template "10085".
{
           "jsonrpc": "2.0",
           "method": "template.massremove",
           "params": {
               "templateids": "10085",
               "templateids_link": [
                   "10106",
                   "10104"
               ]
           },
           "id": 1
       }Response:
CTemplate::massRemove() in ui/include/classes/api/services/CTemplate.php.