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

template-list

 

Container for template list.

template

 

Container for an individual template info. This element may appear more than once (one for each available OS template).

 

id

Used internally.

 

name

Template name. Use this value in API requests that expect a template identifier as an input parameter.

Type: string

 

vendorId

Template vendor ID.

Type: string

 

c2uId

Used internally.

 

osType

Operating system type (Linux, Windows)

Type: string

 

technology

Specifies the virtualization technology used.

Type: string

Possible values:

  • CT is a container.
  • VM is a virtual machine.
 

active

Specifies whether the template is active. Inactive templates cannot be used to create servers.

Type: boolean

 

default

Specifies whether this is the default template.

Type: boolean

 

root-login

Administrator login name (for example, "root").

Type: string

 

min-hdd-size

Minimum required hard disk space.

Type: int

 

pwd-regex

Used internally.

 

high-watermark-for-delivery

Used internally.

 

low-watermark-for-delivery

Used internally.

option

 

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

Value.

Type: string

 

name

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>