activationkey
Description
Contains methods to access common activation key functions available from the web interface.
Namespace:
activationkey
Method: addChildChannels
HTTP POST
Description:
Add child channels to an activation key.
Parameters:
-
string sessionKey
-
string key
-
string array childChannelLabels
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addConfigChannels
HTTP POST
Description:
Given a list of activation keys and configuration channels, this method adds given configuration channels to either the top or the bottom (whichever you specify) of an activation key’s configuration channels list. The ordering of the configuration channels provided in the add list is maintained while adding. If one of the configuration channels in the 'add' list already exists in an activation key, the configuration channel will be re-ranked to the appropriate place.
Parameters:
-
string sessionKey
-
string array keys
-
string array configChannelLabels - List of configuration channel labels in the ranked order.
-
boolean addToTop
-
true - To prepend the given channels to the beginning of the activation key’s config channel list
-
false - To append the given channels to the end of the activation key’s config channel list
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addEntitlements
HTTP POST
Description:
Add add-on System Types to an activation key.
Parameters:
-
string sessionKey
-
string key
-
string array entitlements - Add-on system type labels to associate with the key.
-
container_build_host
-
monitoring_entitled
-
osimage_build_host
-
virtualization_host
-
ansible_control_node
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addPackages
HTTP POST
Description:
Add packages to an activation key.
Parameters:
-
string sessionKey
-
string key
-
array packages
-
struct package
-
string "name" - Package name
-
string "arch" - Arch label - Optional
-
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addServerGroups
HTTP POST
Description:
Add server groups to an activation key.
Parameters:
-
string sessionKey
-
string key
-
int array serverGroupIds
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: checkConfigDeployment
HTTP POST
Description:
Check configuration file deployment status for the activation key specified.
Parameters:
-
string sessionKey
-
string key
Returns:
-
int status - 1 if enabled, 0 if disabled, exception thrown otherwise
Method: clone
HTTP POST
Description:
Clone an existing activation key.
Parameters:
-
string sessionKey
-
string key - Key to be cloned.
-
string cloneDescription - Description of the cloned key.
Returns:
-
string The new activation key
Method: create
HTTP POST
Description:
Create a new activation key. The activation key parameter passed in will be prefixed with the organization ID, and this value will be returned from the create call.
Eg. If the caller passes in the key "foo" and belong to an organization with the ID 100, the actual activation key will be "100-foo".
This call allows for the setting of a usage limit on this activation key. If unlimited usage is desired see the similarly named API method with no usage limit argument.
Parameters:
-
string sessionKey
-
string key - Leave empty to have new key autogenerated.
-
string description
-
string baseChannelLabel - Leave empty to accept default.
-
int usageLimit - If unlimited usage is desired, use the create API that does not include the parameter.
-
string array entitlements - Add-on system type labels to associate with the key.
-
container_build_host
-
monitoring_entitled
-
osimage_build_host
-
virtualization_host
-
ansible_control_node
-
-
boolean universalDefault
Returns:
-
string The new activation key
Method: create
HTTP POST
Description:
Create a new activation key with unlimited usage. The activation key parameter passed in will be prefixed with the organization ID, and this value will be returned from the create call.
Eg. If the caller passes in the key "foo" and belong to an organization with the ID 100, the actual activation key will be "100-foo".
Parameters:
-
string sessionKey
-
string key - Leave empty to have new key autogenerated.
-
string description
-
string baseChannelLabel - Leave empty to accept default.
-
string array entitlements - Add-on entitlement label to associate with the key.
-
virtualization_host
-
-
boolean universalDefault
Returns:
-
string The new activation key
Method: delete
HTTP POST
Description:
Delete an activation key.
Parameters:
-
string sessionKey
-
string key
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: disableConfigDeployment
HTTP POST
Description:
Disable configuration file deployment for the specified activation key.
Parameters:
-
string sessionKey
-
string key
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: enableConfigDeployment
HTTP POST
Description:
Enable configuration file deployment for the specified activation key.
Parameters:
-
string sessionKey
-
string key
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: getDetails
HTTP GET
Description:
Lookup an activation key’s details.
Parameters:
-
string sessionKey
-
string key
Returns:
-
* struct activation key
-
string "key"
-
string "description"
-
int "usage_limit"
-
string "base_channel_label"
-
string array "child_channel_labels" - childChannelLabel
-
string array "entitlements" - entitlementLabel
-
string array "server_group_ids" - serverGroupId
-
string array "package_names" - packageName - (deprecated by packages)
-
array "packages"
-
struct package
-
string "name" - packageName
-
string "arch" - archLabel - optional
-
-
-
boolean "universal_default"
-
boolean "disabled"
-
string "contact_method" - One of the following:
-
default
-
ssh-push
-
ssh-push-tunnel
-
-
Available since API version: 10.2
Method: listActivatedSystems
HTTP GET
Description:
List the systems activated with the key provided.
Parameters:
-
string sessionKey
-
string key
Returns:
-
array :
-
struct system structure
-
int "id" - System id
-
string "hostname"
-
dateTime.iso8601 "last_checkin" - Last time server successfully checked in
-
-
Method: listActivationKeys
HTTP GET
Description:
List activation keys that are visible to the user.
Parameters:
-
string sessionKey
Returns:
-
array :
-
struct activation key
-
string "key"
-
string "description"
-
int "usage_limit"
-
string "base_channel_label"
-
string array "child_channel_labels" - childChannelLabel
-
string array "entitlements" - entitlementLabel
-
string array "server_group_ids" - serverGroupId
-
string array "package_names" - packageName - (deprecated by packages)
-
array "packages"
-
struct package
-
string "name" - packageName
-
string "arch" - archLabel - optional
-
-
-
boolean "universal_default"
-
boolean "disabled"
-
string "contact_method" - One of the following:
-
default
-
ssh-push
-
ssh-push-tunnel
-
-
Available since API version: 10.2
Method: listChannels
HTTP GET
Description:
List the channels for the given activation key with temporary authentication tokens to access them. Authentication is done via a machine specific password.
Parameters:
-
string minionId - The id of the minion to authenticate with.
-
string machinePassword - password specific to a machine.
-
string activationKey - activation key to use channels from.
Returns:
-
array :
-
struct channelInfo
-
string "label" - Channel label
-
string "name" - Channel name
-
string "url" - Channel url
-
string "token" - Channel access token
-
Method: listConfigChannels
HTTP GET
Description:
List configuration channels associated to an activation key.
Parameters:
-
string sessionKey
-
string key
Returns:
-
array :
-
struct configuration channel information
-
int "id"
-
int "orgId"
-
string "label"
-
string "name"
-
string "description"
-
struct "configChannelType"
-
-
struct configuration channel type information
-
int "id"
-
string "label"
-
string "name"
-
int "priority"
-
Method: removeChildChannels
HTTP POST
Description:
Remove child channels from an activation key.
Parameters:
-
string sessionKey
-
string key
-
string array childChannelLabels
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeConfigChannels
HTTP POST
Description:
Remove configuration channels from the given activation keys.
Parameters:
-
string sessionKey
-
string array keys
-
string array configChannelLabels
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeEntitlements
HTTP POST
Description:
Remove entitlements (by label) from an activation key. Currently only virtualization_host add-on entitlement is permitted.
Parameters:
-
string sessionKey
-
string key
-
string array entitlements
-
virtualization_host
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removePackages
HTTP POST
Description:
Remove package names from an activation key.
Parameters:
-
string sessionKey
-
string key
-
array packages
-
struct package
-
string "name" - Package name
-
string "arch" - Arch label - Optional
-
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeServerGroups
HTTP POST
Description:
Remove server groups from an activation key.
Parameters:
-
string sessionKey
-
string key
-
int array serverGroupIds
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setConfigChannels
HTTP POST
Description:
Replace the existing set of configuration channels on the given activation keys. Channels are ranked by their order in the array.
Parameters:
-
string sessionKey
-
string array keys
-
string array configChannelLabels
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setDetails
HTTP POST
Description:
Update the details of an activation key.
Parameters:
-
string sessionKey
-
string key
-
struct details
-
string "description" - optional
-
string "base_channel_label" - optional - to set default base channel set to empty string or 'none'
-
int "usage_limit" - optional
-
boolean "unlimited_usage_limit" - Set true for unlimited usage and to override usage_limit
-
boolean "universal_default" - optional
-
boolean "disabled" - optional
-
string "contact_method" - One of the following:
-
default
-
ssh-push
-
ssh-push-tunnel
-
-
Returns:
-
int - 1 on success, exception thrown otherwise.