ServerMania logo

Add Template Group

To add a template group, use the following request:

POST /settings/image_template_groups.xml
POST /settings/image_template_groups.json

XML Request Example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<image_template_group><label>zaza</label><mak>1</mak><kms_host>ededde.fe</kms_host><kms_port>5453</kms_port><kms>1</kms><own>0</own><kms_server_label>wqqsasawqw</kms_server_label></image_template_group>' --url http://test/settings/image_template_groups.xml

JSON Request Example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"image_template_group":{"label":"zaza", "mak":"1","kms_host":"ededde.fe", "kms_port":"5453", "kms":"1", "own":"1", "kms_server_label":"wqwqw"}}' --url http://test/settings/image_template_groups.json

Returns 201 HTTP response on success

XML Output Example

  <created_at type="datetime">2012-07-13T03:55:21-10:00</created_at>
  <depth type="integer">0</depth>
  <id type="integer">106</id>
  <kms type="boolean">true</kms>
  <lft type="integer">85</lft>
  <mak type="boolean">true</mak>
  <own type="boolean">false</own>
  <parent_id nil="true"></parent_id>
  <rgt type="integer">86</rgt>
  <updated_at type="datetime">2012-07-13T03:55:21-10:00</updated_at>


image_template_group - the image template array with the following parameters:

label – the group name

created_at – the date when the template group was created

id - template group id

kms_host – KMS server host name

kms_port – KMS server port

kms_server_label – KMS server name

label - template group name

mak - MAK windows licensing type

own - user's own license

parent_id - id of the target template group

depth - the depth of a given node (distance from this template group to the root)

lft - left nested set identifier

rgt - right nested set identifier

updated_at – the date when the template group was updated