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.
(object)
Parameters containing the IDs of the template groups to update and the objects that should be updated.
Parameter | Type | Description |
---|---|---|
groups | object/array | Template groups to be updated. The template groups must have only the groupid property defined.Parameter behavior: - required |
templates | 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 only the templateid property defined.Parameter behavior: - required |
(object)
Returns an object containing the IDs of the updated template groups under the groupids
property.
Replace all templates in a template group to ones mentioned templates.
{
"jsonrpc": "2.0",
"method": "templategroup.massupdate",
"params": {
"groups": [
{
"groupid": "8"
}
],
"templates": [
{
"templateid": "40050"
}
]
},
"id": 1
}
Response:
CTemplateGroup::massUpdate() in ui/include/classes/api/services/CTemplateGroup.php.