This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

hostinterface.massremove

Description

object hostinterface.massremove(object parameters)

This method allows to remove host interfaces from the given hosts.

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.

Parameters

(object) Parameters containing the IDs of the hosts to be updated and the interfaces to be removed.

Parameter Type Description
interfaces object/array Host interfaces to remove from the given hosts.

The host interface object must have the ip, dns and port properties defined.

Parameter behavior:
- required
hostids string/array IDs of the hosts to be updated.

Parameter behavior:
- required

Return values

(object) Returns an object containing the IDs of the deleted host interfaces under the interfaceids property.

Examples

Removing interfaces

Remove the "127.0.0.1" SNMP interface from two hosts.

Request:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.massremove",
           "params": {
               "hostids": [
                   "30050",
                   "30052"
               ],
               "interfaces": {
                   "dns": "",
                   "ip": "127.0.0.1",
                   "port": "161"
               }
           },
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30069",
                   "30070"
               ]
           },
           "id": 1
       }
Copy
✔ Copied

See also

Source

CHostInterface::massRemove() in ui/include/classes/api/services/CHostInterface.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.