hostgroup.propagate

Description

object hostgroup.propagate(object parameters)

This method allows to apply permissions and tag filters to all subgroups of a host group.

This method is only available to 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 defining the desired output.

The method supports the following parameters.

Parameter Type Description
groups object/array Host groups to propagate.

The host groups must have the groupid property defined.

Parameter behavior:
- required
permissions boolean Set to "true" to propagate permissions.

Parameter behavior:
- required if tag_filters is not set
tag_filters boolean Set to "true" to propagate tag filters.

Parameter behavior:
- required if permissions is not set

Return values

(object) Returns an object containing the IDs of the propagated host groups under the groupids property.

Examples

Propagating host group permissions and tag filters to its subgroups.

Propagate host group permissions and tag filters to its subgroups.

Request:

{
           "jsonrpc": "2.0",
           "method": "hostgroup.propagate",
           "params": {
               "groups": [
                   {
                       "groupid": "6"
                   }
               ],
               "permissions": true,
               "tag_filters": true
           },
           "id": 1
       }

Response:

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

See also

Source

CHostGroup::propagate() in ui/include/classes/api/services/CHostGroup.php.