templategroup.create
Описание
object templategroup.create(объект/массив templateGroups)
Этот метод позволяет создавать новые группы шаблонов.
Этот метод доступен только пользователю с типом доступа Супер-администратор. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.
Parameters
(object/array) Template groups to create. The method accepts template groups
with the standard template group properties.
Return values
(object) Returns an object containing the IDs of the created template
groups under the groupids property. The order of the returned IDs
matches the order of the passed template groups.
Примеры
Creating a template group
Create a template group called "Templates/Databases".
Request:
{
"jsonrpc": "2.0",
"method": "templategroup.create",
"params": {
"name": "Templates/Databases"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"groupids": [
"107820"
]
},
"id": 1
}
Источник
CTemplateGroup::create() в ui/include/classes/api/services/CTemplateGroup.php.