HostDelete

Delete one or more hosts.

The host must not be in the Immutable state for this method to work. Hosts can be deleted by users under the following conditions:

URL

/cubit_api/1/delete_host

Authentication

This method requires authentication using an API key.

Parameters

force ( zero or once )
If the machine being deleted does not belong to the user initiating the request, the force option is required. The only valid value for this parameter is True.
Type: String
guests ( zero or once )
If the machine is a virtual host and has active virtual guests, setting this parameter to True will delete the virtual guests along with the virtual host. Because deleting a virtual host will delete several hosts at once, we have a separate parameter to confirm this action. The only valid value for this parameter is True. If the host has no virtual guests, this option has no effect. Use of this option can be really convenient, or it can really ruin someone's day!
Type: String
hosts ( Required, once )
List of comma-separated, fully qualified hostnames to delete. Hosts must not be in the Immutable state.
Type: String
sig ( Required, once )
API authentication hash signature.
Type: String
userid ( Required, once )
The login name of the user initiating the request.
Type: String

Example Response

        
    Successful host delete of the host cu011.cubit.example.com:
    <?xml version='1.0'?>
    <cubit version='1'>
        <status>OK</status>
        <output>cu011.cubit.example.com</output>
    </cubit>

    If the user is unauthorized:
    <?xml version='1.0'?>
    <cubit version='1'>
        <error>0 of 1 hosts deleted successfully. Failed hosts below.</error>
        <output>cu013.cubit.example.com: You are not authorized to delete this host.</output>
    </cubit>

    If a deletion of hosts partially succeeds:
    <?xml version='1.0'?>
    <cubit version='1'>
        <error>6 of 8 hosts deleted successfully. Failed hosts below.</error>
        <output>cu013.cubit.example.com: You are not authorized to delete this host</output>
        <output>cu016.cubit.example.com: Host deletion failed</output>
    </cubit>

Response Codes