# hostinterface.massremove

### Description

`object hostinterface.massremove(object parameters)`

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

### Parameters

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

|Parameter|Type|Description|
|---------|----|-----------|
|**hostids**<br>(required)|string/array|IDs of the hosts to be updated.|
|**interfaces**<br>(required)|object/array|Host interfaces to remove from the given hosts.<br><br>The host interface object must have the ip, dns and port properties defined|

### 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:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "hostinterface.massremove",
    "params": {
        "hostids": [
            "30050",
            "30052"
        ],
        "interfaces": {
            "dns": "",
            "ip": "127.0.0.1",
            "port": "161"
        }
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "interfaceids": [
            "30069",
            "30070"
        ]
    },
    "id": 1
}
```

### See also

-   [hostinterface.delete](delete)
-   [host.massremove](/fr/manual/api/reference/host/massremove)

### Source

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