[comment]: # ({9230837a-9230837a})
# hostinterface.massremove

[comment]: # ({/9230837a-9230837a})

[comment]: # ({75214f21-4559aff6})
The `hostinterface.massremove` method allows you to remove host interfaces from the specified hosts. This method is restricted to *Admin* and *Super admin* user types and the permission to call the method can be managed through user role settings.

If you have any specific questions or tasks related to the `hostinterface.massremove` method, feel free to provide more details, and I'd be happy to assist you further!

[comment]: # ({/75214f21-4559aff6})

[comment]: # ({c81c7a33-8970fdbb})
### Parameters

`(object)` Parameters met de ID's van de hosts die moeten worden bijgewerkt en de interfaces die moeten worden verwijderd.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Beschrijving|
|--|--|------|
|interfaces|object/array|Hostinterfaces die van de opgegeven hosts moeten worden verwijderd.<br><br>Het hostinterface-object moet de eigenschappen `ip`, `dns` en `port` gedefinieerd hebben.<br><br>[Gedrag van de parameter](/manual/api/reference_commentary#parameter-behavior):<br>- *verplicht*|
|hostids|string/array|ID's van de hosts die moeten worden bijgewerkt.<br><br>[Gedrag van de parameter](/manual/api/reference_commentary#parameter-behavior):<br>- *verplicht*|

[comment]: # ({/c81c7a33-8970fdbb})

[comment]: # ({61a8b976-61a8b976})
### Retourwaarden

`(object)` Retourneert een object dat de ID's van de gemaakte host bevat
interfaces onder de eigenschap `interfaceids`.

[comment]: # ({/61a8b976-61a8b976})

[comment]: # ({b41637d2-b41637d2})
### Voorbeelden

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({c2d2ec7c-cceffaf2})
#### Verwijderen van interfaces

Verwijder de SNMP-interface "127.0.0.1" van twee hosts.

[Aanvraag](/manual/api#performing-requests):

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

Reactie:

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

[comment]: # ({/c2d2ec7c-cceffaf2})

[comment]: # ({a3245281-a3245281})
### Zie ook

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

[comment]: # ({/a3245281-a3245281})

[comment]: # ({6853cf7a-6853cf7a})
### Bron

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

[comment]: # ({/6853cf7a-6853cf7a})
