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

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

[comment]: # ({8f1cd3fa-8f1cd3fa})
### 説明

`object host.delete(array hosts)`

このメソッドは、ホストを削除することができます。

::: noteclassic
このメソッドは、*Admin*および*Super admin*タイプのユーザーのみ利用可能です。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細は[ユーザーの役割](/manual/web_interface/frontend_sections/administration/user_roles)を参照してください。
:::

[comment]: # ({/8f1cd3fa-8f1cd3fa})

[comment]: # ({cede3d95-cede3d95})
### パラメーター

`(array)` 削除するホストのID。

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

[comment]: # ({54b4a855-54b4a855})
### 戻り値

`(object)` `hostids`プロパティの下にある削除されたホストのIDを含むオブジェクトを返します。

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

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

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

[comment]: # ({f3cc0680-ef767d02})
#### 複数のホストの削除

2つのホストを削除します。

リクエスト:

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

レスポンス:

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

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

[comment]: # ({9d5f3989-9d5f3989})
### ソース

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

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