[comment]: # ({dd2b9519-dd2b9519})
# host.delete

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

[comment]: # ({4fc1750c-8f1cd3fa})
### Opis

`object host.delete(array hosts)`

Ta metoda umożliwia usuwanie hostów.

::: noteclassic
Ta metoda jest dostępna tylko dla 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]: # ({/4fc1750c-8f1cd3fa})

[comment]: # ({cede3d95-cede3d95})
### Parametry

`(array)` ID hostów do usunięcia.

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

[comment]: # ({54b4a855-54b4a855})
### Zwracane wartości

`(object)` Zwraca obiekt zawierający identyfikatory usuniętych hostów 
w właściwości `hostids`.

[comment]: # ({/54b4a855-54b4a855})

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

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

[comment]: # ({47a8da31-ef767d02})
#### Usuwanie wielu hostów

Usuń dwa hosty.

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

```json
{
"jsonrpc": "2.0",
"method": "host.delete",
"params": [
"13",
"32"
],
"id": 1
}
```

Odpowiedź:

```json
{
"jsonrpc": "2.0",
"result": {
"hostids": [
"13",
"32"
]
},
"id": 1
}
```

[comment]: # ({/47a8da31-ef767d02})

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

CHost::delete() w *ui/include/classes/api/services/CHost.php*.

[comment]: # ({/9d5f3989-9d5f3989})
