[comment]: # translation:outdated

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

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

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

`object hostinterface.massremove(object parameters)`

Ta metoda pozwala na usuwanie interfejsów hosta z podanych hostów.

::: noteclassic
Ta metoda jest dostępna tylko dla typów użytkowników *Admin* i *Super admin*. Uprawnienia do wywołania metody można odwołać w ustawieniach
roli użytkownika. Więcej informacji można znaleźć w [User
roles](/manual/web_interface/frontend_sections/users/user_roles).
:::

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

[comment]: # ({a7252dca-8970fdbb})
### Parametry

`(object)` Parametry zawierające identyfikatory hostów do zaktualizowania oraz
interfejsy do usunięcia.

|Parametr|[Typ](/manual/api/reference_commentary#data-types)|Opis|
|--|--|------|
|interfaces|object/array|[Interfejsy hosta](/manual/api/reference/hostinterface/object) do usunięcia z podanych hostów.<br><br>Obiekt interfejsu hosta musi mieć zdefiniowane tylko właściwości `ip`, `dns` i `port`.<br><br>[Zachowanie parametru](/manual/api/reference_commentary#parameter-behavior):<br>- *wymagany*|
|hostids|ID/array|Identyfikatory hostów do zaktualizowania.<br><br>[Zachowanie parametru](/manual/api/reference_commentary#parameter-behavior):<br>- *wymagany*|

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

[comment]: # ({61a8b976-61a8b976})
### Zwracane wartości

`(object)` Zwraca obiekt zawierający identyfikatory usuniętych interfejsów 
hosta we właściwości `interfaceids`.

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

[comment]: # ({b41637d2-b41637d2})
### Przykłady

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

[comment]: # ({c2d2ec7c-cceffaf2})
#### Usuwanie interfejsów

Usuń interfejs SNMP „127.0.0.1” z dwóch hostów.

[Żądanie](/manual/api#performing-requests):

```json
{
"jsonrpc": "2.0",
"metoda": "hostinterface.massremove",
"parametry": {
"idy hosta": [
"30050",
"30052"
],
"interfejsy": {
"dns": "",
"ip": "127.0.0.1",
"port": "161"
}
},
"id": 1
}
```

Odpowiedź:

```json
{
"jsonrpc": "2.0",
"wynik": {
"idy interfejsu": [
"30069",
"30070"
]
},
"id": 1
}
```

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

[comment]: # ({a3245281-a3245281})
### Zobacz także

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

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

[comment]: # ({6853cf7a-6853cf7a})
### Źródło

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

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