ServerMania logo

Get List of Templates Attached to Template Group

To see the list of attached templates, use the following request:

GET /settings/image_template_groups/:image_template_group_id/relation_group_templates.xml
GET /settings/image_template_groups/:image_template_group_id/relation_group_templates.json

XML Request Example

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

JSON Request Example

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

XML Output Example

<relation_group_templates type="array">
  <relation_group_template>
    <created_at type="datetime">2014-04-25T12:07:43+00:00</created_at>
    <id type="integer">944</id>
    <image_template_group_id type="integer">49</image_template_group_id>
    <price type="decimal">0.0</price>
    <template_id type="integer">1043</template_id>
    <updated_at type="datetime">2014-04-25T12:07:43+00:00</updated_at>
    <image_template>
      <allow_resize_without_reboot type="boolean">false</allow_resize_without_reboot>
      <allowed_hot_migrate type="boolean">false</allowed_hot_migrate>
      <allowed_swap type="boolean">false</allowed_swap>
      <backup_server_id type="integer">2</backup_server_id>
      <baremetal_server type="boolean">false</baremetal_server>
      <cdn type="boolean">false</cdn>
      <checksum>1f6e8532a3b914be5d02e5ed178396a1</checksum>
      <created_at type="datetime">2014-04-15T15:21:15+00:00</created_at>
      <disk_target_device>---
xen: hd
kvm: hd
</disk_target_device>
      <ext4 type="boolean">false</ext4>
      <file_name>m3xp52x2yog50g_20140415182115</file_name>
      <id type="integer">1043</id>
      <initial_password>Password1</initial_password>
      <initial_username>Administrator</initial_username>
      <label>win_custom_template</label>
      <manager_id nil="true"/>
      <min_disk_size type="integer">20</min_disk_size>
      <min_memory_size type="integer">1024</min_memory_size>
      <operating_system>windows</operating_system>
      <operating_system_arch>x64</operating_system_arch>
      <operating_system_distro>2008</operating_system_distro>
      <operating_system_edition>STD</operating_system_edition>
      <operating_system_tail>R2</operating_system_tail>
      <parent_template_id type="integer">36</parent_template_id>
      <remote_id nil="true"/>
      <smart_server type="boolean">false</smart_server>
      <state>active</state>
      <template_size type="integer">16131528</template_size>
      <updated_at type="datetime">2014-04-15T15:36:37+00:00</updated_at>
      <user_id type="integer">2508</user_id>
      <version>3.2</version>
      <virtualization>xen</virtualization>
    </image_template>
  </relation_group_template>
</relation_group_templates>

Where:

relations – the array of 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 – the 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 templarte 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