This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

templategroup.massupdate

Description

object templategroup.massupdate(object parameters)

This method allows to replace templates with the specified ones in multiple template groups.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object) Parameters containing the IDs of the template groups to update and the objects that should be updated.

Parameter Type Description
groups
(required)
object/array Template groups to be updated.

The template groups must have the groupid property defined.
templates
(required)
object/array Templates to replace the current template on the given template groups.
All other template, except the ones mentioned, will be excluded from template groups.

The templates must have the templateid property defined.

戻り値

(object) groupidsプロパティの下に更新されたテンプレートグループのIDを含むオブジェクトを返します。

テンプレートグループ内のテンプレートを置き換える

テンプレートグループ内のすべてのテンプレートを、指定のテンプレートに置き換えます。

リクエスト :

{
           "jsonrpc": "2.0",
           "method": "templategroup.massupdate",
           "params": {
               "groups": [
                   {
                       "groupid": "8"
                   }
               ],
               "templates": [
                   {
                       "templateid": "40050"
                   }
               ]
           },
           "id": 1
       }
Copy
✔ Copied

レスポンス :

{
           "jsonrpc": "2.0",
           "result": {
               "groupids": [
                   "8",
               ]
           },
           "id": 1
       }
Copy
✔ Copied

参照

ソース

CTemplateGroup::massUpdate() in ui/include/classes/api/services/CTemplateGroup.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.