<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Helvetica}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
p.p1, li.p1, div.p1
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
ol
        {margin-bottom:0cm}
ul
        {margin-bottom:0cm}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body lang="DE-AT" link="blue" vlink="purple" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 13px;">
<div style="">Thanks for that, this worked perfectly.</div>
<div style=""><br>
</div>
<div style="">For your info, I have started work on a PHP client to the REST/JSON API, see <a href="https://github.com/CpuID/pve2-api-php-client">https://github.com/CpuID/pve2-api-php-client</a> for the progress so far... :)</div>
<div style=""><br>
</div>
<div style="">I believe all the methods should work, just need to test DELETE and PUT next...</div>
<div style=""><br>
</div>
<div style="">Regards,</div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<p class="p1"></p>
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px">
<font><font face="Arial,sans-serif" size="4" color="#0088CF" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:13.5pt">Nathan Sullivan</span></font><font face="Arial,sans-serif"><br>
</font><font class="Apple-style-span" color="#cccccc" face="Arial, sans-serif">Voice Specialist</font></font></div>
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px">
<font><font face="Helvetica,sans-serif" size="2" color="black" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt">NetSIP pty ltd – An Impirical Company</span></font><font face="Helvetica,sans-serif" size="2" color="black" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt"><br>
Level 3, 24 Little Edward St, Spring Hill QLD 4000</span></font><font face="Helvetica,sans-serif"><font class="Apple-style-span" color="#0088cf"><br>
</font></font><font face="Helvetica,sans-serif" size="2" color="#0088CF" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt">t    </span></font><font face="Helvetica,sans-serif" size="2" color="black" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt">1300
 638 747</span></font><font face="Helvetica,sans-serif" size="2" color="#1F497D" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt"><br>
</span></font><font face="Helvetica,sans-serif" size="2" color="#0088CF" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt">e   <a href="mailto:nathan.sullivan@netsip.com.au">nathan.sullivan</a></span></font><font face="Helvetica,sans-serif" size="2" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt"><a href="mailto:nathan.sullivan@netsip.com.au">@netsip.com.au</a></span></font><font face="Helvetica,sans-serif" size="2" color="black" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt">     </span></font><font face="Helvetica,sans-serif" size="2" style="font-family:Tahoma,Arial,Helvetica; font-size:11pt"><span style="font-size:10pt"><font color="#0088CF"><a href="http://www.netsip.com.au">www.netsip.com.au</a></font></span></font></font></div>
<p></p>
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF496031" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> Dietmar Maurer [dietmar@proxmox.com]<br>
<b>Sent:</b> Friday, 20 April 2012 1:59 PM<br>
<b>To:</b> Nathan Sullivan; pve-devel@pve.proxmox.com<br>
<b>Subject:</b> RE: Format of "ostemplate" value in Prox 2.0 API<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Use the following command to list templates:</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"># pvesm list local --content vztmpl</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Format is something like: ${storageid}:vztmpl/${filename}</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">- Dietmar</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> pve-devel-bounces@pve.proxmox.com [mailto:pve-devel-bounces@pve.proxmox.com]
<b>On Behalf Of </b>Nathan Sullivan<br>
<b>Sent:</b> Freitag, 20. April 2012 02:48<br>
<b>To:</b> pve-devel@pve.proxmox.com<br>
<b>Subject:</b> [pve-devel] Format of "ostemplate" value in Prox 2.0 API</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Hi Guys,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Trying to utilise the Proxmox 2.0 REST API, by POSTing to /api2/json/nodes/vz1/openvz (vz1 being the node name) to create a new OpenVZ container. Cannot seem
 to get the correct syntax for "ostemplate", can someone please clarify the format?</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">See below for an example HTTP response:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">HTTP/1.1 500 unable to parse directory volume name '/var/lib/vz/template/cache/debian-6.0-standard_6.0-4_amd64.tar.gz'</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Date: Thu, 19 Apr 2012 23:43:36 GMT</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Server: Apache</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Pragma: no-cache</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Cache-control: no-cache</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Content-Length: 170</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Connection: close</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Content-Type: text/plain; charset=iso-8859-1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Expires: Thu, 19 Apr 2012 23:43:36 GMT</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">I have tried various formats, including "local:debian-6.0-standard_6.0-4_amd64.tar.gz" and "local:/var/lib/vz/template/cache/debian-6.0-standard_6.0-4_amd64.tar.gz"
 but can't quite put my finger on it. The documentation doesnt clarify the input format.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Regards,</span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt; font-family:"Tahoma","sans-serif"; color:#0088CF">Nathan Sullivan</span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"><br>
</span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#CCCCCC">Voice Specialist</span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">NetSIP pty ltd – An Impirical Company<br>
Level 3, 24 Little Edward St, Spring Hill QLD 4000</span><span style="font-size:10.0pt; font-family:"Helvetica","sans-serif"; color:#0088CF"><br>
</span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:#0088CF">t    </span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">1300 638 747</span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:#1F497D"><br>
</span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:#0088CF">e   <a href="mailto:nathan.sullivan@netsip.com.au" target="_blank">nathan.sullivan</a></span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"><a href="mailto:nathan.sullivan@netsip.com.au" target="_blank">@netsip.com.au</a>     </span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:#0088CF"><a href="http://www.netsip.com.au" target="_blank">www.netsip.com.au</a></span><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>