Overview
Error Handling

Methods

API Documentation (API Version v1)

Cloud/Template/

DESCRIPTION

Templates are OS images created and maintained by LiquidWeb. This section of the API allows remote interaction with those images.

details

URL:

https://api.liquidweb.com/v1/Cloud/Template/details

Description:

Get information about a specific template. You can query details about inactive templates because backups, existing servers, and images might be tied to one, but you cannot provision to or restore an inactive template. You can, however, restore from a deprecated template.

Here's a rundown of what those fields mean:

	active: a flag indicating whether the template is currently active.  You can
	only create or reimage servers to active templates.

	deprecated: a flag indicating whether the template has been deprecated.
	This means it can't be used for new creates, but can be used to restore
	from backups or images.

	description: the descriptive OS template name

	id: the id of the template

	manage_level: 'self', 'core', or 'full', determined by which template you
	chose when creating the server

		self: Includes support for hardware, network and virtualization layers.

		core: Includes complete support of the base operating system as well as
		Apache, Mysql and PHP. Proactive service restoration is provided.

		full: Includes cPanel + Fantastico as well complete support of base
		operating system and all cPanel services. Proactive service restoration
		is provided.

	name: a unique identifier for the template, used in methods like
	server/create

	os: an internal OS identifier.  There can be multiple templates that have
	the same OS, but differ in other ways (like management level).

Parameters:

ParameterTypeNotes
idA positive integer value (i.e. 1 and up).* Required if:
  • template is not given
templateA string permitting tabs, carriage returns and newlines* Required if:
  • id is not given

Returns:

FieldType
deprecatedA boolean value (0 or 1).
descriptionA string permitting tabs, carriage returns and newlines
idA positive integer value (i.e. 1 and up).
manage_levelA single word, consisting of only letters and digits.
nameA single word, consisting of only letters, digits, hyphens, and underscores.
osA single word, consisting of only letters, digits, hyphens, and underscores.
zone_availabilityAn associative array of arbitrary keys and values.

Possible Errors:

Refer to the Error Handling documentation for the list of exception types

list

URL:

https://api.liquidweb.com/v1/Cloud/Template/list

Description:

Get a list of useable templates. More information about the fields returned can be found in the documenation for server/template/details

This method returns templates that are currently active, including deprecated templates which may not be used for new instances but may be associated with existing servers or backups.

Parameters:

ParameterTypeNotes
page_numA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 1
page_sizeA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 25

Returns:

FieldType
item_countA non-negative integer value (i.e. 0 and up).
item_totalA non-negative integer value (i.e. 0 and up).
itemsAn array of associative arrays containing
 
deprecatedA boolean value (0 or 1).
descriptionA string permitting tabs, carriage returns and newlines
idA positive integer value (i.e. 1 and up).
manage_levelA single word, consisting of only letters and digits.
nameA single word, consisting of only letters, digits, hyphens, and underscores.
osA single word, consisting of only letters, digits, hyphens, and underscores.
zone_availabilityAn associative array of arbitrary keys and values.
page_numA positive integer value (i.e. 1 and up).
page_sizeA positive integer value (i.e. 1 and up).
page_totalA positive integer value (i.e. 1 and up).

Possible Errors:

Refer to the Error Handling documentation for the list of exception types

restore

URL:

https://api.liquidweb.com/v1/Cloud/Template/restore

Description:

Re-images a server with the template requested. If the 'force' flag is passed it will rebuild the filesystem on the server before restoring. This option is not usually needed, but if regular restores are failing, it can fix some scenarios.

Parameters:

ParameterTypeNotes
forceA boolean value (0 or 1).
idA positive integer value (i.e. 1 and up).* Required if:
  • template is not given
templateA string permitting tabs, carriage returns and newlines* Required if:
  • id is not given
uniq_idA six-character identifier, containing only capital letters and digits.* Required

Returns:

FieldType
reimagedA six-character identifier, containing only capital letters and digits.

Possible Errors:

Refer to the Error Handling documentation for the list of exception types