ServerMania logo

Get My Template Groups List

To view the list of your template groups, use the following request:

GET /image_template_groups/own.xml
GET /image_template_groups/own.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/image_template_groups/own.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/image_template_groups/own.json

XML Output example

<image_template_groups type="array">
  <image_template_group>
    <id type="integer">48</id>
    <label>new</label>
    <parent_id nil="true"/>
    <lft type="integer">49</lft>
    <rgt type="integer">52</rgt>
    <depth type="integer">0</depth>
    <mak type="boolean">false</mak>
    <own type="boolean">false</own>
    <kms type="boolean">false</kms>
    <kms_server_label></kms_server_label>
    <kms_host></kms_host>
    <kms_port></kms_port>
    <created_at type="datetime">2014-04-25T11:36:36+00:00</created_at>
    <updated_at type="datetime">2014-04-25T11:36:36+00:00</updated_at>
    <system_group type="boolean">false</system_group>
    <hypervisor_group_id nil="true"/>
    <user_id type="integer">2508</user_id>
    <children type="array">
      <child>
        <id type="integer">49</id>
        <label>child</label>
        <parent_id type="integer">48</parent_id>
        <lft type="integer">50</lft>
        <rgt type="integer">51</rgt>
        <depth type="integer">1</depth>
        <mak type="boolean">false</mak>
        <own type="boolean">true</own>
        <kms type="boolean">true</kms>
        <kms_server_label>serverlabel</kms_server_label>
        <kms_host>server.host</kms_host>
        <kms_port>2</kms_port>
        <created_at type="datetime">2014-04-25T11:43:56+00:00</created_at>
        <updated_at type="datetime">2014-04-25T12:08:26+00:00</updated_at>
        <system_group type="boolean">false</system_group>
        <hypervisor_group_id nil="true"/>
        <user_id type="integer">2508</user_id>
        <children type="array"/>
        <relations type="array">
          <relation>
            <id type="integer">944</id>
            <template_id type="integer">1043</template_id>
            <image_template_group_id type="integer">49</image_template_group_id>
            <price type="decimal">0.0</price>
            <created_at type="datetime">2014-04-25T12:07:43+00:00</created_at>
            <updated_at type="datetime">2014-04-25T12:07:43+00:00</updated_at>
            <image_template>
              <id type="integer">1043</id>
              <label>win_custom_template</label>
              <created_at type="datetime">2014-04-15T15:21:15+00:00</created_at>
              <updated_at type="datetime">2014-04-15T15:36:37+00:00</updated_at>
              <version>3.2</version>
              <file_name>m3xp52x2yog50g_20140415182115</file_name>
              <operating_system>windows</operating_system>
              <operating_system_distro>2008</operating_system_distro>
              <allowed_swap type="boolean">false</allowed_swap>
              <state>active</state>
              <checksum>1f6e8532a3b914be5d02e5ed178396a1</checksum>
              <allow_resize_without_reboot type="boolean">false</allow_resize_without_reboot>
              <min_disk_size type="integer">20</min_disk_size>
              <user_id type="integer">2508</user_id>
              <template_size type="integer">16131528</template_size>
              <allowed_hot_migrate type="boolean">false</allowed_hot_migrate>
              <operating_system_arch>x64</operating_system_arch>
              <operating_system_edition>STD</operating_system_edition>
              <operating_system_tail>R2</operating_system_tail>
              <parent_template_id type="integer">36</parent_template_id>
              <virtualization>xen</virtualization>
              <min_memory_size type="integer">1024</min_memory_size>
              <disk_target_device>---
xen: hd
kvm: hd
			  </disk_target_device>
              <cdn type="boolean">false</cdn>
              <backup_server_id type="integer">2</backup_server_id>
              <ext4 type="boolean">false</ext4>
              <smart_server type="boolean">false</smart_server>
              <baremetal_server type="boolean">false</baremetal_server>
              <initial_password nil="true"/>
              <initial_username nil="true"/>
              <remote_id nil="true"/>
              <manager_id nil="true"/>
            </image_template>
          </relation>
        </relations>
      </child>
    </children>
    <relations type="array"/>
  </image_template_group>
</image_template_groups>

Where:

image_template_group – the array with the template group details
id – the ID of this template group
label – the name of the template group
parent_id – the ID of the parent group. Applicable to child groups only
lft - left nested set identifier
rgt - right nested set identifier
depth - the depth of a given node (distance from this template group to the root)
mak – MAK windows licensing type
own – user’s own license for Windows licensing
kms – KMS windows licensing type
kms_server_label – name of the KMS licensing server
kms_host - KMS server host name
kms_port – KMS server port
created_at – time when the template group was created
updated_at – time of the last changes to the template group
system_group - true for the groups created with the installation; for Template Store groups only 
user_id – user, to whom this group belongs
children – an array of the child groups
child – an array with child group details
id – child group ID
label – child group name
parent_id – the ID of the group to which this child group belongs
relations – an array with templates associated with this group/childgroup
id – the relation ID
template_id – the ID of the assigned template
image_template_group_id – the ID of the group/childgroup, to which the above template is assigned
price – the template’s cost
image_template – an array with template details
id – the template’s ID
label – the name of the template
version – the file’s version
file_name – the name of the template file
operating_system – operating system name
operating_system_distro – operating system distribution
allowed_swap - true, if the swap is allowed, otherwise false
state - state of the template (active, inactive)
checksum – file checksum
allow_resize_without_reboot – true if resize without reboot is possible; otherwise false
min_disk_size – minimum disk size required to build a VS on this template (GB)
user_id - the ID of a user who owns this template
template_size - the size of the template
allowed_hot_migrate - true, if the hot migration is allowed, otherwise false
operating_system_arch – architecture of the operating system
operating_system_edition – edition of the OS
operating_system_tail – tail of the OS
parent_template_id – the ID of the template from which this custom template originates
virtualization – virtualization type which is compatible with this template
min_memory_size – minimal required RAM for the template
disk_target_device - the prefix indicating the method of translating the disk to a VS by compute resource
cdn - true if this template can be used for building edge servers, otherwise false
backup_server_id - the ID of the backup server where the template is stored
ext4 - true if ext4 file system is supported
smart_server - true if the smart server can be built from this template
baremetal_server - true if the baremetal server can be built from this template
initial_password - preset the password for the VS built on this template
initial_username - preset the username for the VS built on this template
remote_id - ID of the template, if it came from the market
manager_id - ID of the template on the template server