[comment]: # translation:outdated

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

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

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

`object hostinterface.massremove(object parameters)`

Šī metode ļauj noņemt hostu saskarnes no norādītajiem hostiem.

::: noteclassic
Šī metode ir pieejama tikai *Admin* un *Super admin*
lietotāju tipiem. Atļaujas izsaukt šo metodi var tikt atsauktas lietotāja lomas
iestatījumos. Plašāku informāciju skatiet [Lietotāju
lomas](/manual/web_interface/frontend_sections/users/user_roles).
:::

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

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

`(object)` Parametri, kas satur atjaunināmo hostu ID un
noņemamās saskarnes.

|Parametrs|[Tips](/manual/api/reference_commentary#data-types)|Apraksts|
|--|--|------|
|interfaces|object/array|[Hostu saskarnes](/manual/api/reference/hostinterface/object), kas jānoņem no norādītajiem hostiem.<br><br>Hosta saskarnes objektam jābūt definētām tikai `ip`, `dns` un `port` īpašībām.<br><br>[Parametra darbība](/manual/api/reference_commentary#parameter-behavior):<br>- *obligāts*|
|hostids|ID/array|Atjaunināmo hostu ID.<br><br>[Parametra darbība](/manual/api/reference_commentary#parameter-behavior):<br>- *obligāts*|

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

[comment]: # ({61a8b976-61a8b976})
### Atgrieztās vērtības

`(object)` Atgriež objektu, kas satur dzēsto hostu saskarņu ID īpašībā `interfaceids`.

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

[comment]: # ({b41637d2-b41637d2})
### Piemēri

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

[comment]: # ({c2d2ec7c-cceffaf2})
#### Saskarņu noņemšana

Noņemiet SNMP saskarni "127.0.0.1" no diviem hostiem.

[Pieprasījums](/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
}
```

Atbilde:

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

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

[comment]: # ({a3245281-a3245281})
### Skatīt arī

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

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

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

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

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