На странице
templategroup.massremove
Описание
object templategroup.massremove(параметры объекта)
Этот метод позволяет удалить связанные объекты из нескольких групп шаблонов.
Этот метод доступен только пользователям с типом доступа Администратор и Супер-администратор. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.
Parameters
(object) Parameters containing the IDs of the template groups to update
and the objects that should be removed.
| Parameter | Type | Description |
|---|---|---|
| groupids (required) |
string/array | IDs of the template groups to be updated. |
| templateids | string/array | Templates to remove from all template groups. |
Return values
(object) Returns an object containing the IDs of the updated template
groups under the groupids property.
Примеры
Removing templates from template groups
Remove two templates from the given template groups.
Request:
{
"jsonrpc": "2.0",
"method": "hostgroup.massremove",
"params": {
"groupids": [
"5",
"6"
],
"hostids": [
"30050",
"30001"
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"groupids": [
"5",
"6"
]
},
"id": 1
}
Source
CTemplateGroup::massRemove() in ui/include/classes/api/services/CTemplateGroup.php.