HostAssignProfileAndRebuild

Assign a profile to the host and rebuild it with that profile/version.

The user must be authorized to rebuild the host. If the host is in any of the states which disallow rebuilding, such as Immutable, Rebuild, or Rebuilding, this method will fail. The host must also not be of a type which prohibits rebuilding (e.g., an EC2 host). If you do not want to change the profile a host is running, and just want to rebuild a host, you can save a few keystrokes and use the Rebuild method instead.

URL

/cubit_api/1/assign_rebuild

Authentication

This method requires authentication using an API key.

Parameters

host ( Required, once )
Fully qualified hostname to assign profile to and rebuild.
Type: String
profile ( Required, once )
Name of the profile to assign to the host.
Type: String
revision ( zero or once )
Revision number of the profile you wish to assign to the host. Mutually exclusive with the version option, but at least one of the version or revision options must be specified.
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
version ( zero or once )
Version number or tag name of the profile you wish to assign to the host. The special version tag HEAD always denotes the latest version of the profile at the moment of execution. Note that profile tags can move between versions: this is a useful feature, but you should be aware of it. Mutually exclusive with the revision option, but at least one of the version or revision options must be specified.
Type: String

Example Response

        
    Successful initiation of rebuild:
    <?xml version='1.0'?>
    <cubit version='1'>
        <status>OK</status>
    </cubit>

    If the user is unauthorized, or the host does not exist:
    <?xml version='1.0'?>
    <cubit version='1'>
        <error>You are not authorized to allocate a profile to this host and rebuild it.</error>
    </cubit>
    

Response Codes