Login | Join Now
  • CUBiT API: HostGetAssignedProfile

    Product:
    CUBiT

    Component:
    CUBiT Web Services

    Summary:

    Gets the assigned profile for the host, and returns the profile name along with the revision and version number.



     

    1.1. Description

    Gets the assigned profile for the host, and returns the profile name along with the revision and version number. Output is available in both text and XML formats. You can also get this information from the QueryAlloc method, but the output of this method is easier to parse if you have scripts checking a profile. The user requesting information about a host must have at least login privileges to that host.

    1.2. URL

    /cubit_api/1/assigned_profile

    1.3. Authentication

    This method requires authentication using an API key.

    1.4. Parameters

    	host ( Required, once )
    		Fully qualified hostname to query. 
    		Type: String
    	output ( Required, once )
    		Output type, either 'txt' (for text output) or 'xml' (for XML output). 
    		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
    

    1.5. Example Response

    Sample XML output:

    	<?xml version='1.0'?>
    	<cubit version='1'>
    	  <profile revision="1838" version="5">solaris10_x86</profile>
    	</cubit>
    	
    	Sample text output:
    	solaris10_x86  1838  5
    	
    	If user is unauthorized:
    	<?xml version='1.0'?>
    	<cubit version='1'>
    		<error>You do not have permissions to view this host</error>
    	</cubit>
    

    1.6. Response Codes

    • 200 - ok
    • 400 - Login failed / Insufficient permissions