API Docs

Get to know add_key

Overview: Adds a new SSH key to the list of keys you are able to use.

add_key expects the following parameters:

  • keyname – The name/label you want to use for the SSH key.
  • pubkey – The SSH public key.

NOTE: This function returns the id of the new SSH key.

Example:

$params = array(
	'keyname' => 'The name of the SSH key',
	'pubkey' => 'The actual SSH public key goes here'
);

$api->call('cloud.add_key', $params);
								

Output:

10