This is a translation of the original English documentation page. Help us make it better.

templategroup.massadd

説明

object templategroup.massadd(object parameters)

このメソッドは、指定されたテンプレートグループすべてに複数の関連オブジェクトを同時に追加することができます。

このメソッドは、AdminおよびSuper adminタイプのユーザーのみ利用可能です。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細はユーザーの役割を参照してください。

Parameters

(object) Parameters containing the IDs of the template groups to update and the objects to add to all the template groups.

The method accepts the following parameters.

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

The template groups must have the groupid property defined.
templates object/array Templates to add to all template groups.

The templates must have the templateid property defined.

戻り値

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

テンプレートグループへテンプレートの追加

ID12と13のテンプレートグループへ二つのテンプレートを追加します。

リクエスト :

{
           "jsonrpc": "2.0",
           "method": "templategroup.massadd",
           "params": {
               "groups": [
                   {
                       "groupid": "12"
                   },
                   {
                       "groupid": "13"
                   }
               ],
               "templates": [
                   {
                       "templateid": "10486"
                   },
                   {
                       "templateid": "10487"
                   }
               ]
           },
           "id": 1
       }

レスポンス :

{
           "jsonrpc": "2.0",
           "result": {
               "groupids": [
                   "12",
                   "13"
               ]
           },
           "id": 1
       }

参照

ソース

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