List Installed OS Templates
Description
Use this call to obtain a list of the available operating system templates. An operating system template is a package which is used to create new servers. It contains a particular operating system type and version (and software applications in some cases) together with the necessary instructions, and is used to pre-configure a server and install the operating system into it. When creating a server, use this request to obtain a list of the available OS templates, then choose the template of interest and use its name as an input parameter in the server creation call. The {name}
part of the request URL is optional and may contain the OS template name. When it is included, only the information about the specified template will be retrieved.
Syntax
GET baseURL/template/{name}
Request Parameters
None
Response
Element |
Attribute |
Description |
---|---|---|
|
Container for template list. |
|
|
Container for an individual template info. This element may appear more than once (one for each available OS template). |
|
|
Used internally. |
|
|
Template name. Use this value in API requests that expect a template identifier as an input parameter. Type: string |
|
|
Template vendor ID. Type: string |
|
|
Used internally. |
|
|
Operating system type (Linux, Windows) Type: string |
|
|
Specifies the virtualization technology used. Type: string Possible values:
|
|
|
Specifies whether the template is active. Inactive templates cannot be used to create servers. Type: boolean |
|
|
Specifies whether this is the default template. Type: boolean |
|
|
Administrator login name (for example, "root"). Type: string |
|
|
Minimum required hard disk space. Type: int |
|
|
Used internally. |
|
|
Used internally. |
|
|
Used internally. |
|
|
Additional template information in name and value pairs (for example, the target CPU type and OS info). This element may appear more than once. |
|
|
Value. Type: string |
|
|
Name. Type: string |
Example 1
The following example retrieves the list of all available OS templates.
Request
GET https://c2u-web:4465/paci/v1.0/template
Response
Only a small portion of the actual OS template list is shown for brevity.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <template-list> <template high-watermark-for-delivery="100" low-watermark-for-delivery="99" pwd-regex="[0-9]{3}[a-z]{3}[A-Z]{3}" min-hdd-size="1" root-login="root" default="true" technology="CT" osType="linux-free" c2uId="1" vendorId="6" active="true" name="centos-6-x86_64" id="1"> <option value="x86_64" name="arch"/> <option value="centos" name="edition"/> <option value="English" name="lang"/> </template> <template high-watermark-for-delivery="100" low-watermark-for-delivery="99" pwd-regex="[0-9]{3}[a-z]{3}[A-Z]{3}" min-hdd-size="10" root-login="root" default="true" technology="VM" osType="linux-free" c2uId="1" vendorId="6" active="true" name="paci-centos-6" id="2"> <option value="x86_64" name="arch"/> <option value="centos" name="edition"/> <option value="English" name="lang"/> </template> <template high-watermark-for-delivery="100" low-watermark-for-delivery="99" pwd-regex="[0-9]{3}[a-z]{3}[A-Z]{3}" min-hdd-size="20" root-login="Administrator" default="true" technology="VM" osType="windows" c2uId="1" vendorId="2008" active="true" name="paci-win2k8r2sp1" id="3"> <option value="x86_64" name="arch"/> <option value="datacenter" name="edition"/> <option value="English" name="lang"/> </template> <template high-watermark-for-delivery="100" low-watermark-for-delivery="99" pwd-regex="[0-9]{3}[a-z]{3}[A-Z]{3}" min-hdd-size="10" root-login="Administrator" default="false" technology="VM" osType="windows" c2uId="1" vendorId="2008" active="true" name="w2k8r2SP1x64_ja_dtc" id="7"> <option value="x86_64" name="arch"/> <option value="datacenter" name="edition"/> <option value="Japan" name="lang"/> </template> ........ </template-list>
Example 2
The following example retrieves the information about the centos-6-x86_64 operating system template.
Request
GET https://c2u-web:4465/paci/v1.0/template/centos-6-x86_64
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <template high-watermark-for-delivery="100" low-watermark-for-delivery="99" pwd-regex="[0-9]{3}[a-z]{3}[A-Z]{3}" min-hdd-size="1" root-login="root" default="true" technology="CT" osType="linux-free" c2uId="1" vendorId="6" active="true" name="centos-6-x86_64" id="1"> <option value="x86_64" name="arch"/> <option value="centos" name="edition"/> <option value="English" name="lang"/> </template>