<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">This is my request:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">POST /api/vms HTTP/1.1</div><div id="bloop_customfont" style="margin: 0px;">Authorization: Basic YWRatW5AaA50YSJuYWw1aABja2VyMTM=</div><div id="bloop_customfont" style="margin: 0px;">Content-Type: application/json</div><div id="bloop_customfont" style="margin: 0px;">Accept: application/json</div><div id="bloop_customfont" style="margin: 0px;">Host: 192.168.2.21</div><div id="bloop_customfont" style="margin: 0px;">Connection: close</div><div id="bloop_customfont" style="margin: 0px;">User-Agent: Paw/2.2.1 (Macintosh; OS X/10.10.3) GCDHTTPRequest</div><div id="bloop_customfont" style="margin: 0px;">Content-Length: 83</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">{"vm":{"name":"superduper","cluster.name":"local_cluster","template.name":"Blank"}}</div></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">This is the message I get back:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">{</div><div id="bloop_customfont" style="margin: 0px;"> "message": "Request syntactically incorrect. See the description below for the correct usage:",</div><div id="bloop_customfont" style="margin: 0px;"> "detailedLink": {</div><div id="bloop_customfont" style="margin: 0px;"> "description": "add a virtual machine to the system",</div><div id="bloop_customfont" style="margin: 0px;"> "request": {</div><div id="bloop_customfont" style="margin: 0px;"> "http_method": "POST",</div><div id="bloop_customfont" style="margin: 0px;"> "headers": {</div><div id="bloop_customfont" style="margin: 0px;"> "header": [</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "value": "application/xml|json",</div><div id="bloop_customfont" style="margin: 0px;"> "name": "Content-Type",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "true"</div><div id="bloop_customfont" style="margin: 0px;"> },</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "value": "any string",</div><div id="bloop_customfont" style="margin: 0px;"> "name": "Correlation-Id",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "false"</div><div id="bloop_customfont" style="margin: 0px;"> },</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "value": "201-created",</div><div id="bloop_customfont" style="margin: 0px;"> "name": "Expect",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "false"</div><div id="bloop_customfont" style="margin: 0px;"> }</div><div id="bloop_customfont" style="margin: 0px;"> ]</div><div id="bloop_customfont" style="margin: 0px;"> },</div><div id="bloop_customfont" style="margin: 0px;"> "body": {</div><div id="bloop_customfont" style="margin: 0px;"> "type": "VM",</div><div id="bloop_customfont" style="margin: 0px;"> "parameters_set": [</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "description": "add a virtual machine to the system from scratch",</div><div id="bloop_customfont" style="margin: 0px;"> "parameter": [</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "name": "vm.name",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "true",</div><div id="bloop_customfont" style="margin: 0px;"> "type": "xs:string"</div><div id="bloop_customfont" style="margin: 0px;"> },</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "name": "vm.template.id|name",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "true",</div><div id="bloop_customfont" style="margin: 0px;"> "type": "xs:string"</div><div id="bloop_customfont" style="margin: 0px;"> },</div><div id="bloop_customfont" style="margin: 0px;"> {</div><div id="bloop_customfont" style="margin: 0px;"> "name": "vm.cluster.id|name",</div><div id="bloop_customfont" style="margin: 0px;"> "required": "true",</div><div id="bloop_customfont" style="margin: 0px;"> "type": "xs:string"</div><div id="bloop_customfont" style="margin: 0px;"> },</div></div> <br> <div class="bloop_sign" id="bloop_sign_1432472757438843904"></div> <br><p class="airmail_on" style="color:#000;">On 24 May 2015 at 15:00:26, X.Smalbil (<a href="mailto:xander@netbulae.eu">xander@netbulae.eu</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div>
<title></title>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Hi everybody,</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Where can I find some examples of using the REST api? </div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
I find it hard to find out what parameters I can send to in order
to get rid of the “Request is syntactically incorrect” or “Bad
request” errors</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
so I can have a good play around.</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Best regards,</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Xander Smalbil</div>
<div class="bloop_container">
<div class="bloop_frame"></div>
</div>
<br>
<div id="bloop_sign_1432472131907482112" class="bloop_sign"></div>
</div></div></span></blockquote><BR />
<BR />
<b style="color:#604c78"></b><br><span style="color:#604c78;"><font color="000000"><span style="mso-fareast-language:en-gb;" lang="NL">Met vriendelijke groet, With kind regards,<br><br></span>Xander Smalbil</font></span><b style="color:#604c78"><br><br>Netbulae Virtualization Experts </b><br><hr style="border:none;border-top:1px solid #ccc;"><table style="width: 522px"><tbody><tr><td style="width: 130px;font-size: 10px">Tel: 053 20 30 270</td> <td style="width: 130px;font-size: 10px">info@netbulae.eu</td> <td style="width: 130px;font-size: 10px">Staalsteden 4-3A</td> <td style="width: 130px;font-size: 10px">KvK 08198180</td></tr><tr> <td style="width: 130px;font-size: 10px">Fax: 053 20 30 271</td> <td style="width: 130px;font-size: 10px">www.netbulae.eu</td> <td style="width: 130px;font-size: 10px">7547 TA Enschede</td> <td style="width: 130px;font-size: 10px">BTW NL821234584B01</td></tr></tbody></table><br><hr style="border:none;border-top:1px solid #ccc;"><BR />
</body></html>