Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Virtual Machine Templates Resource

Exposed Resources Hierarchy
Virtual Machine Templates Resource

Contents:

This resource allows you to manage templates for virtual machines.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates

Exposed Methods

Retrieve all virtual machine templates

Returns all virtual machine templates.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_ENUMERATE,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

categoryName

false

 

name of a category

hypervisorTypeName

false

 

type of an hypervisor

virtualdatacenter

false

 

identifier of a virtual datacenter

stateful

false

 

string value to inclued persistent templates, it can be ALL, USED or NOTUSED

imported

false

false

boolean to include imported templates

ostype

false

 

optionally filter by operating system (null for any filter)

64bits

false

 

optionally filter by x64 architecture. It requires ''ostype'' param set to null
(null for any filter)

startwith

false

0

first element to retrieve

by

false

id

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineTemplates Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all virtual machine templates example
curl --verbose -u user:password example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -X GET -H "accept:application/vnd.abiquo.virtualmachinetemplates+xml;version=2.4"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.virtualmachinetemplates+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2NjQ4ODk4NTo1N2Q0NmE5NDFhMTUyYmE0ZDBiMzg2OTE1MWM0NGJmMDpBQklRVU8; Expires=Wed, 30-Jan-2013 17:21:28 GMT; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=2.4
< Transfer-Encoding: chunked
< Date: Wed, 30 Jan 2013 16:51:29 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplates>
    <link rel="first" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates?limit=25&amp;by=id"/>
    <link rel="last" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates?startwith=0&amp;limit=25&amp;by=id"/>
    <totalSize>25</totalSize>
    <virtualMachineTemplate>
        <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1"/>
        <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/conversions"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1"/>
        <link rel="diskfile" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=diskFile"/>
        <link title="Abiquo KVM" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15"/>
        <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
        <link rel="ovfdocument" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=envelope"/>
        <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/15/tasks"/>
        <link rel="template" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf"/>
        <link rel="templatedefinition" href="http://rs.bcn.abiquo.com:9000/ovf/71/desc.ovf"/>
        <link rel="templatestatus" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F71%252Fdesc.ovf?format=status"/>
        <id>15</id>
        <name>Abiquo KVM</name>
        <description></description>
        <osType>UNRECOGNIZED</osType>
        <osVersion></osVersion>
        <path>1/rs.bcn.abiquo.com/abiport9000/ovf/71/KVM-Recursion.qcow2</path>
        <diskFormatType>QCOW2_SPARSE</diskFormatType>
        <diskFileSize>320798720</diskFileSize>
        <cpuRequired>1</cpuRequired>
        <ramRequired>1024</ramRequired>
        <hdRequired>4294967296</hdRequired>
        <shared>false</shared>
        <state>DONE</state>
        <creationDate>2013-01-30T17:51:18+01:00</creationDate>
        <creationUser>SYSTEM</creationUser>
        <chefEnabled>false</chefEnabled>
        <iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/q.png</iconUrl>
        <loginUser>user</loginUser>
        <loginPassword>password</loginPassword>
        <ethernetDriverType>E1000</ethernetDriverType>
        <diskControllerType>SCSI</diskControllerType>
    </virtualMachineTemplate>
    <virtualMachineTemplate>
        <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1"/>
        <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19/conversions"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1"/>
        <link rel="diskfile" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=diskFile"/>
        <link title="Abiquo VirtualBox Node v2" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19"/>
        <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
        <link rel="ovfdocument" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=envelope"/>
        <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/19/tasks"/>
        <link rel="template" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F53%252Fdesc.ovf"/>
        <link rel="templatedefinition" href="http://rs.bcn.abiquo.com:9000/ovf/53/desc.ovf"/>
        <link rel="templatestatus" href="http://example.com/am/erepos/1/templates/rs.bcn.abiquo.com%253A9000%252Fovf%252F53%252Fdesc.ovf?format=status"/>
        <id>19</id>
        <name>Abiquo VirtualBox Node v2</name>
        <description>Abiquo VirtualBox Node</description>
        <osType>UNRECOGNIZED</osType>
        <osVersion></osVersion>
        <path>1/rs.bcn.abiquo.com/abiport9000/ovf/53/abiquo-vbox-v2.qcow2</path>
        <diskFormatType>QCOW2_SPARSE</diskFormatType>
        <diskFileSize>381400576</diskFileSize>
        <cpuRequired>1</cpuRequired>
        <ramRequired>512</ramRequired>
        <hdRequired>4294967296</hdRequired>
        <shared>false</shared>
        <state>DONE</state>
        <creationDate>2013-01-30T17:51:18+01:00</creationDate>
        <creationUser>SYSTEM</creationUser>
        <chefEnabled>false</chefEnabled>
        <iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/q.png</iconUrl>
        <loginUser>user</loginUser>
        <loginPassword>password</loginPassword>
        <ethernetDriverType>E1000</ethernetDriverType>
        <diskControllerType>SCSI</diskControllerType>
    </virtualMachineTemplate>
</virtualMachineTemplates>

Create a new persistent template

This functionality creates a new persistent template from an existing template. To create the persistent template, the disk of the existing template will be dumped on a volume. The dto sent to this method contains: - two properties: – the name for the new volume – the name for the new template - three required links: – the link of the original template, which has the disk to dump to the volume – the link of the virtual datacenter, where the template will be accessible – a link with the information about the storage device where the disk will be dumped, which could be a link to a specific volume or a link to a tier where a new volume will be created.

Important: this process requires a RAW conversion of the original template. If this conversion does not exist, it will be created as the first step of the process.

Synopsis: POST http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Roles Required: ROLE_VAPP_CREATE_STATEFUL,ROLE_APPLIB_ALLOW_MODIFY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4; Content-type: application/vnd.abiquo.virtualmachinetemplatepersistent+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineTemplatePersistent Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Create a new persistent template example
curl --verbose -u user:password -X POST example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -H "content-type:application/vnd.abiquo.virtualmachinetemplatepersistent+xml;version=2.4" -H "accept:application/vnd.abiquo.acceptedrequest+xml;version=2.4" -d @persistent.xml
 
> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.4.4 libidn/1.23 librtmp/2.4
> Host: example.com
> content-type:application/vnd.abiquo.virtualmachinetemplatepersistent+xml;version=2.4
> accept:application/vnd.abiquo.acceptedrequest+xml;version=2.4
> Content-Length: 624
 
 
< HTTP/1.1 202 Aceptado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU0MDI0ODQzOTo2ZjAzNmU4ZmIyNjFkYzgzZDJhNTYyNTY4NDUwYjNhMTpBQklRVU8; Expires=Wed, 30-Jan-2013 10:04:08 GMT; Path=/api
< Set-Cookie: JSESSIONID=57AF984D8C3558456417F2CEFEBAE866; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=2.4
< Content-Length: 441
< Date: Wed, 30 Jan 2013 09:34:10 GMT
 
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
    <link rel="status" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/29/tasks/db8de1ea-169b-4344-bdef-0bf5117d5fb2"/>
    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Request creation of a new virtual machine template in the datacenter repository

There are two ways to create a new virtual machine template: Download: use a ''TemplateDefinition'' link in the VirtualMachineTemplateRequestDto Promote: use an instance ''VirtualMachineTemplate'' link and the ''promotedName'' in VirtualMachineTemplateRequestDto

Both methods pre-create the virtual machine template and return a task to track the progress.

Synopsis: POST http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Roles Required: ROLE_VAPP_CREATE_STATEFUL,ROLE_APPLIB_ALLOW_MODIFY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4; Content-type: application/vnd.abiquo.virtualmachinetemplaterequest+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineTemplateRequest Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Request creation of a new virtual machine template in the datacenter repository example
// creating a template from a template definition link

curl -X POST "http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates" \
    -H 'Content-Type: application/vnd.abiquo.virtualmachinetemplaterequest+xml;version=2.4' \
    -H 'Accept: application/vnd.abiquo.acceptedrequest+xml;version=2.4' \
    -d '<virtualmachinetemplaterequest>
        <link rel="templateDefinition" href="http://example.com/api/admin/enterprises/1/appslib/templateDefinitions/5"/>
    </virtualmachinetemplaterequest>' -u user:password
    
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
    <link rel="status" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5"/>
    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

// creating a template from a template link

curl -X POST "http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates" \
    -H 'Content-Type: application/vnd.abiquo.virtualmachinetemplaterequest+xml;version=2.4' \
    -H 'Accept: application/vnd.abiquo.acceptedrequest+xml;version=2.4' \
    -d '<virtualmachinetemplaterequest>
        <link rel="virtualmachinetemplate" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/10"/>
        <promotedName>myVeryOwnTemplate</promotedName>
    </virtualmachinetemplaterequest>' -u user:password
    
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
    <link rel="status" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/11/tasks/1de13d2e-6a06-4357-93e2-2f36c7c8f4ee"/>
    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

You can track the download progress of the task by using the ''taskextended'' media type. Look at the ''progress'' attibute or ''errorCause'' for failed downloads.

curl  -X GET http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5 \
    -H 'Accept: application/vnd.abiquo.taskextended+xml;version=2.4' \
    -u user:password  
  
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<taskextended>
  <link rel="parent" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks" />
  <link rel="self" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks/767987c3-5363-4356-9293-1b04abe75eb5" />
  <ownerId>9</ownerId>
  <state>STARTED</state>
  <taskId>767987c3-5363-4356-9293-1b04abe75eb5</taskId>
  <timestamp>1352112228</timestamp>
  <type>DOWNLOAD</type>
  <userId>admin</userId>
  <jobsExtended>
    <jobextended>
      <description>Download task's download on virtual machine
      template with id 9</description>
      <id>acdc8daa-128f-4259-b29d-16a7eab6284f</id>
      <parentTaskId>
      767987c3-5363-4356-9293-1b04abe75eb5</parentTaskId>
      <rollbackState>UNKNOWN</rollbackState>
	  <state>STARTED</state>
      <timestamp>1352112448</timestamp>
      <type>DOWNLOAD</type>
      <progress>5</progress>
    </jobextended>
  </jobsExtended>
</taskextended>

To cancel the download task delete the precreated virtual machine template.

 

 

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Install template in datacenterrepository based on TemplateDefinition representation

Request a virtual machine template download into a datacenter repository.

Synopsis: POST http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates
Roles Required: ROLE_VAPP_CREATE_STATEFUL,ROLE_APPLIB_ALLOW_MODIFY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+xml; version=2.4; Content-type: application/vnd.abiquo.templatedefinition+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: TemplateDefinition Media Type
Response Message Body Entity: AcceptedRequest Media Type
Request Example:

 Click here to show or hide the request example
Install template in datacenterrepository based on TemplateDefinition representation example
curl --verbose -u user:password -X POST example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates -H "content-type:application/vnd.abiquo.templatedefinition+xml;version=2.4" -H "accept:application/vnd.abiquo.acceptedrequest+xml;version=2.4" -d @dtos/templatedefinition.xml


> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.acceptedrequest+xml;version=2.4
> content-type:application/vnd.abiquo.templatedefinition+xml;version=2.4
> Content-Length: 525


< HTTP/1.1 202 Aceptado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM2MzI1ODQ0MTgxMTpmZjIwZmY2NGE4Y2YwYjdhN2JlZWVmNGQ3YzFhNjI3YTpBQklRVU8; Expires=Thu, 14-Mar-2013 10:54:01 GMT; Path=/api
< Set-Cookie: JSESSIONID=5E1195809DDA3F7570F30B370B3079A1; Path=/api
< Content-Type: application/vnd.abiquo.acceptedrequest+xml;version=2.4
< Content-Length: 439
< Date: Thu, 14 Mar 2013 10:24:02 GMT


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<acceptedrequest>
    <link rel="status" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/2/tasks/f5cf66c4-ce19-436f-9f40-f3535f2f28f4"/>
    <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">You can keep track of the progress in the link</message>
</acceptedrequest>

 

 

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Retrieve a task for a virtual machine template

Displays a specific task on the virtual machine template. Tasks are a set of jobs (operations on hypervisors). Any of these tasks may still be in progress. Every task has a UUID.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}//tasks/{id}
Roles Required:
Request Headers: Accept: application/vnd.abiquo.task+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Task Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a task for a virtual machine template example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d -X GET -H "accept:application/vnd.abiquo.task+xml;version=2.4"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.task+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzIyNzY5Mzo3NWRkZmY4ZDUyM2Q5YmFmNDJhNWJhZjI3NWNhMDE1ODpBQklRVU8; Expires=Thu, 31-Jan-2013 10:13:47 GMT; Path=/api
< Set-Cookie: JSESSIONID=E55F6C171504DFD98EEA70EC3C3AF7EB; Path=/api
< Content-Type: application/vnd.abiquo.task+xml;version=2.4
< Content-Length: 1196
< Date: Thu, 31 Jan 2013 09:43:47 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
    <link rel="parent" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/>
    <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/>
    <link rel="self" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/>
    <creationTimestamp>1359624796</creationTimestamp>
    <jobs>
        <job>
            <creationTimestamp>1359624796</creationTimestamp>
            <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description>
            <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id>
            <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId>
            <rollbackState>UNKNOWN</rollbackState>
            <state>DONE</state>
            <timestamp>1359624815</timestamp>
            <type>DUMP_DISK_TO_VOLUME</type>
        </job>
    </jobs>
    <ownerId>26</ownerId>
    <state>FINISHED_SUCCESSFULLY</state>
    <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId>
    <timestamp>1359624815</timestamp>
    <type>MAKE_PERSISTENT</type>
    <userId>admin</userId>
</task>


Retrieve a virtual machine template

Returns a virtual machine template.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_ENUMERATE,ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CUSTOMISE_SETTINGS,ROLE_VAPP_PERFORM_ACTIONS,ROLE_VAPP_DEPLOY_UNDEPLOY,ROLE_VAPP_ASSIGN_NETWORK,ROLE_VAPP_ASSIGN_VOLUME,ROLE_VAPP_CREATE_STATEFUL,ROLE_PHYS_DC_RETRIEVE_DETAILS,ROLE_MANAGE_HARD_DISKS
Request Headers: Accept: application/vnd.abiquo.virtualmachinetemplate+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualMachineTemplate Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a virtual machine template example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X GET -H "accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2Njk3MDQ3Mzo0MDEzZTM4YjI0M2FhODgxODlkOWRjZWI2ZTIyN2M2ZjpBQklRVU8; Expires=Wed, 30-Jan-2013 17:29:30 GMT; Path=/api
< Set-Cookie: JSESSIONID=9A2DDF016A4D0C96FD255BCC5C96B04F; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4
< Content-Length: 2758
< Date: Wed, 30 Jan 2013 16:59:30 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplate>
    <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1"/>
    <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/conversions"/>
    <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
    <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1"/>
    <link rel="diskfile" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=diskFile"/>
    <link title="m0n0wall" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8"/>
    <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link rel="ovfdocument" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=envelope"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/tasks"/>
    <link rel="template" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf"/>
    <link rel="templatedefinition" href="http://promoted/myVeryOwnTemplate/myVeryOwnTemplate.ovf"/>
    <link rel="templatestatus" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=status"/>
    <id>8</id>
    <name>m0n0wall</name>
    <description>m0n0wall is a project aimed at creating a complete, embedded firewall software package that, when used together with an embedded PC, provides all the important features of commercial firewall boxes (including ease of use) at a fraction of the price (free</description>
    <osType>LINUX_2_6</osType>
    <path>1/promoted/myVeryOwnTemplate/myVeryOwnTemplate.vmdk</path>
    <diskFormatType>VMDK_FLAT</diskFormatType>
    <diskFileSize>27262976</diskFileSize>
    <cpuRequired>1</cpuRequired>
    <ramRequired>128</ramRequired>
    <hdRequired>27262976</hdRequired>
    <shared>false</shared>
    <state>DONE</state>
    <creationDate>2013-01-30T17:51:17+01:00</creationDate>
    <creationUser>SYSTEM</creationUser>
    <chefEnabled>false</chefEnabled>
    <iconUrl>http://abispace.s3.amazonaws.com/m0n0wall/m0n0wall_logo.png</iconUrl>
    <ethernetDriverType>E1000</ethernetDriverType>
    <diskControllerType>IDE</diskControllerType>
</virtualMachineTemplate>


Retrieve all tasks

Displays the tasks on the virtual machine template. Tasks are a set of jobs (operations). Any of these tasks may still be in progress.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}//tasks
Roles Required:
Request Headers: Accept: application/vnd.abiquo.tasks+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Tasks Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all tasks example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks -X GET -H "accept:application/vnd.abiquo.tasks+xml;version=2.4"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.tasks+xml;version=2.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzEzMjM1NDpkNzM0NzJmNTRjMTliNTA1MGY1NDM1ODk3YjViYTYwNjpBQklRVU8; Expires=Thu, 31-Jan-2013 10:12:12 GMT; Path=/api
< Set-Cookie: JSESSIONID=D6EA26DAEDF45109097C03E9C2E79804; Path=/api
< Content-Type: application/vnd.abiquo.tasks+xml;version=2.4
< Content-Length: 1461
< Date: Thu, 31 Jan 2013 09:42:12 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tasks>
    <link rel="self" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/>
    <link rel="parent" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/>
    <task>
        <link rel="parent" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/>
        <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/>
        <link rel="self" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/>
        <creationTimestamp>1359624796</creationTimestamp>
        <jobs>
            <job>
                <creationTimestamp>1359624796</creationTimestamp>
                <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description>
                <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id>
                <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId>
                <rollbackState>UNKNOWN</rollbackState>
                <state>DONE</state>
                <timestamp>1359624815</timestamp>
                <type>DUMP_DISK_TO_VOLUME</type>
            </job>
        </jobs>
        <ownerId>26</ownerId>
        <state>FINISHED_SUCCESSFULLY</state>
        <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId>
        <timestamp>1359624815</timestamp>
        <type>MAKE_PERSISTENT</type>
        <userId>admin</userId>
    </task>
</tasks>


Modify a vitual machine template

Modifies a virtual machine template.

Synopsis: PUT http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}
Roles Required: ROLE_APPLIB_ALLOW_MODIFY,ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: application/vnd.abiquo.virtualmachinetemplate+xml; version=2.4; Content-type: application/vnd.abiquo.virtualmachinetemplate+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VirtualMachineTemplate Media Type
Response Message Body Entity: VirtualMachineTemplate Media Type
Request Example:

 Click here to show or hide the request example
Modify a vitual machine template example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X PUT -H "accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4" -H "content-type:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4" -d @dtos/template.xml 

> PUT /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4
> content-type:application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4
> Content-Length: 2987

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTU2NzUzMTk3OTo4YzUzMjVkNzRlZTc0NWU3MDUzOWQ3MTlkYjVhNzgyNDpBQklRVU8; Expires=Wed, 30-Jan-2013 17:38:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=FBCB7CCE046FB0F716D8784DAB14BBCF; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplate+xml;version=2.4
< Content-Length: 2755
< Date: Wed, 30 Jan 2013 17:08:52 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<virtualMachineTemplate>
    <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1"/>
    <link rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/conversions"/>
    <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
    <link rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1"/>
    <link rel="diskfile" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=diskFile"/>
    <link title="m0n0wall updated" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8"/>
    <link rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link rel="ovfdocument" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=envelope"/>
    <link rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8/tasks"/>
    <link rel="template" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf"/>
    <link rel="templatedefinition" href="http://promoted/myVeryOwnTemplate/myVeryOwnTemplate.ovf"/>
    <link rel="templatestatus" href="http://example.com/am/erepos/1/templates/promoted%252FmyVeryOwnTemplate%252FmyVeryOwnTemplate.ovf?format=status"/>
    <id>8</id>
    <name>m0n0wall updated</name>
    <description>m0n0wall is a project aimed at creating a complete, embedded firewall software package that, when used together with an embedded PC, provides all the important features of commercial firewall boxes (including ease of use) at a fraction of the price (free</description>
    <osType>LINUX_2_6</osType>
    <path>1/promoted/myVeryOwnTemplate/myVeryOwnTemplate.vmdk</path>
    <diskFormatType>VMDK_FLAT</diskFormatType>
    <diskFileSize>27262976</diskFileSize>
    <cpuRequired>1</cpuRequired>
    <ramRequired>128</ramRequired>
    <hdRequired>27262976</hdRequired>
    <shared>false</shared>
    <creationDate>2013-01-30T17:51:17+01:00</creationDate>
    <creationUser>SYSTEM</creationUser>
    <chefEnabled>false</chefEnabled>
    <iconUrl>http://abispace.s3.amazonaws.com/m0n0wall/m0n0wall_logo.png</iconUrl>
    <ethernetDriverType>E1000</ethernetDriverType>
    <diskControllerType>IDE</diskControllerType>
</virtualMachineTemplate>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Delete a virtual machine template

Deletes a virtual machine template.

Synopsis: DELETE http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}
Roles Required: ROLE_APPLIB_ALLOW_MODIFY,ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Delete a virtual machine template example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 -X DELETE

> DELETE /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/8 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept: */*

< HTTP/1.1 204 No Content


Make unavailable a virtual machine template

If the virtual machine template is in use (instances or virtual machines) it can't be deleted, but it can be marked as unavailable, this will remove the template disk file from the repository filesystem but keept the API reference as a virtual machine template with state = UNAVAILABLE

Synopsis: POST http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/deletefile
Roles Required: ROLE_APPLIB_ALLOW_MODIFY,ROLE_VDC_MANAGE_VAPP,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Delete a virtual machine template example
curl --verbose -u admin:xabiquo -X POST "http://admin:xabiquo@localhost/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/deletefile" 
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin'
> POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/deletefile HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 204 No Content


Retrieve a task including additional job info (progress, errorCause) for a virtual machine template

Displays a specific task on the virtual machine template. Tasks are a set of jobs (operations on hypervisors). Any of these tasks may still be in progress. Every task has a UUID. Job includes downloading progress or error cause.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}//tasks/{id}
Roles Required:
Request Headers: Accept: application/vnd.abiquo.taskextended+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: TaskExtended Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a task including additional job info (progress, errorCause) for a virtual machine template example
curl --verbose -u user:password http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d -X GET -H "accept:application/vnd.abiquo.taskextended+xml;version=2.4"

> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.taskextended+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYyNzI5NjA1NTo2YzE0MzE5MzU3MmU1YzViNjgxODY1ZDlmNmMxN2E5ZTpBQklRVU8; Expires=Thu, 31-Jan-2013 10:14:56 GMT; Path=/api
< Set-Cookie: JSESSIONID=CF17A6EF50AD63A1DA78F1C969373AC9; Path=/api
< Content-Type: application/vnd.abiquo.taskextended+xml;version=2.4
< Content-Length: 1146
< Date: Thu, 31 Jan 2013 09:44:56 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<taskextended>
    <link rel="parent" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks"/>
    <link rel="result" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26"/>
    <link rel="self" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/26/tasks/eee40847-974b-4501-801d-c36c87b09f9d"/>
    <ownerId>26</ownerId>
    <state>FINISHED_SUCCESSFULLY</state>
    <taskId>eee40847-974b-4501-801d-c36c87b09f9d</taskId>
    <timestamp>1359624815</timestamp>
    <type>MAKE_PERSISTENT</type>
    <userId>admin</userId>
    <jobsExtended>
        <jobextended>
            <description>Make persistent task's dump disk to volume on virtual machine template with id 26</description>
            <id>740268ef-0df8-46f7-b92d-9aae33ac481c</id>
            <parentTaskId>eee40847-974b-4501-801d-c36c87b09f9d</parentTaskId>
            <rollbackState>UNKNOWN</rollbackState>
            <state>DONE</state>
            <timestamp>1359624815</timestamp>
            <type>DUMP_DISK_TO_VOLUME</type>
        </jobextended>
    </jobsExtended>
</taskextended>


 

 

Retrieve the virtual machine templates instances using the current template

Returns all the virtual machine templates instances of the current (master) virtual machine template

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/instances
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.6; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

allenterprises

false

false

a cloudadmin can see all the virtual machine templates in all enterprises (by default only see those in its current enterprise)

Request Message Body Entity:
Response Message Body Entity: VirtualMachineTemplates Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all virtual machine templates example
curl --verbose -u admin:xabiquo -X GET "http://admin:xabiquo@localhost/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances" 
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin'
> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NjkwNTc3NDk0NTo4N2UyMTc0ZDIzNzJmOTg3YTQ1ZWVjOTJmYTM0MDg5NjpBQklRVU8; Expires=Mon, 19-Aug-2013 09:49:34 GMT; Path=/api
< Set-Cookie: JSESSIONID=6E222337A478712A8794E8DFF97EF1AB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=2.6
< Content-Length: 3408
< Date: Mon, 19 Aug 2013 09:19:34 GMT
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><virtualMachineTemplates><virtualMachineTemplate><link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://localhost:80/api/admin/datacenters/1"/><link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/><link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://localhost:80/api/config/categories/1"/><link title="27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9"/><link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks"/><link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1"/><link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/conversions"/><link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/action/virtualmachines"/><link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/><link rel="template" href="http://10.60.1.223:80/am/erepos/1/templates/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://10.60.1.223:80/am/files/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="templatedefinition" href="1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="template" href="http://10.60.1.223:80/am/erepos/1/templates/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://10.60.1.223:80/am/files/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><id>9</id><name>27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core</name><description>root : abiquo</description><osType>UNRECOGNIZED</osType><osVersion></osVersion><path>1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2</path><diskFormatType>QCOW2_SPARSE</diskFormatType><diskFileSize>12976128</diskFileSize><cpuRequired>1</cpuRequired><ramRequired>64</ramRequired><hdRequired>104857600</hdRequired><shared>false</shared><state>DONE</state><creationDate>2013-08-19T11:19:25+02:00</creationDate><creationUser* Connection #0 to host localhost left intact
* Closing connection #0
>SYSTEM</creationUser><chefEnabled>false</chefEnabled><iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/tinycore.png</iconUrl><loginUser>user</loginUser><loginPassword>password</loginPassword><ethernetDriverType>E1000</ethernetDriverType><diskControllerType>SCSI</diskControllerType></virtualMachineTemplate></virtualMachineTemplates>

 

Retrieve the virtual machine using the current template

Returns all the virtual machine with relation to the current virtual machine template

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}/action/virtualmachines
Roles Required: ROLE_APPLIB_VIEW,ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.virtualmachine+xml; version=2.6; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

allenterprises

false

false

a cloudadmin can see all the virtual machine templates in all enterprises (by default only see those in its current enterprise)

hashypervisorfalse 

if provided filter returned vms having/not having a relation to some hypervisor

Request Message Body Entity:
Response Message Body Entity: VirtualMachineTemplates Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all virtual machine templates example
curl --verbose -u admin:xabiquo -X GET "http://admin:xabiquo@localhost/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances" 
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin'
> GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1/action/instances HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM3NjkwNTc3NDk0NTo4N2UyMTc0ZDIzNzJmOTg3YTQ1ZWVjOTJmYTM0MDg5NjpBQklRVU8; Expires=Mon, 19-Aug-2013 09:49:34 GMT; Path=/api
< Set-Cookie: JSESSIONID=6E222337A478712A8794E8DFF97EF1AB.nodeAlbert; Path=/api
< Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=2.6
< Content-Length: 3408
< Date: Mon, 19 Aug 2013 09:19:34 GMT
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><virtualMachineTemplates><virtualMachineTemplate><link title="a" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://localhost:80/api/admin/datacenters/1"/><link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/><link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://localhost:80/api/config/categories/1"/><link title="27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core" rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9"/><link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/tasks"/><link title="repository" rel="datacenterrepository" type="application/vnd.abiquo.datacenterrepository+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1"/><link title="conversions" rel="conversions" type="application/vnd.abiquo.conversions+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/conversions"/><link title="virtual machines" rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/9/action/virtualmachines"/><link title="Core" rel="master" type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://localhost:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/><link rel="template" href="http://10.60.1.223:80/am/erepos/1/templates/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://10.60.1.223:80/am/files/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="templatedefinition" href="1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="template" href="http://10.60.1.223:80/am/erepos/1/templates/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><link rel="diskfile" href="http://10.60.1.223:80/am/files/1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2"/><id>9</id><name>27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core</name><description>root : abiquo</description><osType>UNRECOGNIZED</osType><osVersion></osVersion><path>1/rs.bcn.abiquo.com/abiport9000/ovf/305/27cc77d4-2534-4f47-a1a2-ae46c2bd2c9a-snapshot-Core.qcow2</path><diskFormatType>QCOW2_SPARSE</diskFormatType><diskFileSize>12976128</diskFileSize><cpuRequired>1</cpuRequired><ramRequired>64</ramRequired><hdRequired>104857600</hdRequired><shared>false</shared><state>DONE</state><creationDate>2013-08-19T11:19:25+02:00</creationDate><creationUser* Connection #0 to host localhost left intact
* Closing connection #0
>SYSTEM</creationUser><chefEnabled>false</chefEnabled><iconUrl>http://rs.bcn.abiquo.com:9000/public/icons/tinycore.png</iconUrl><loginUser>user</loginUser><loginPassword>password</loginPassword><ethernetDriverType>E1000</ethernetDriverType><diskControllerType>SCSI</diskControllerType></virtualMachineTemplate></virtualMachineTemplates>