[ovirt-users] JSON
X.Smalbil
xander at netbulae.eu
Sun May 24 13:07:44 UTC 2015
This is my request:
POST /api/vms HTTP/1.1
Authorization: Basic YWRatW5AaA50YSJuYWw1aABja2VyMTM=
Content-Type: application/json
Accept: application/json
Host: 192.168.2.21
Connection: close
User-Agent: Paw/2.2.1 (Macintosh; OS X/10.10.3) GCDHTTPRequest
Content-Length: 83
{"vm":{"name":"superduper","cluster.name":"local_cluster","template.name":"Blank"}}
This is the message I get back:
{
"message": "Request syntactically incorrect. See the description below for the correct usage:",
"detailedLink": {
"description": "add a virtual machine to the system",
"request": {
"http_method": "POST",
"headers": {
"header": [
{
"value": "application/xml|json",
"name": "Content-Type",
"required": "true"
},
{
"value": "any string",
"name": "Correlation-Id",
"required": "false"
},
{
"value": "201-created",
"name": "Expect",
"required": "false"
}
]
},
"body": {
"type": "VM",
"parameters_set": [
{
"description": "add a virtual machine to the system from scratch",
"parameter": [
{
"name": "vm.name",
"required": "true",
"type": "xs:string"
},
{
"name": "vm.template.id|name",
"required": "true",
"type": "xs:string"
},
{
"name": "vm.cluster.id|name",
"required": "true",
"type": "xs:string"
},
On 24 May 2015 at 15:00:26, X.Smalbil (xander at netbulae.eu) wrote:
Hi everybody,
Where can I find some examples of using the REST api?
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
so I can have a good play around.
Best regards,
Xander Smalbil
Met vriendelijke groet, With kind regards,
Xander Smalbil
Netbulae Virtualization Experts
----------------
Tel: 053 20 30 270 info at netbulae.eu Staalsteden 4-3A KvK 08198180
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede BTW NL821234584B01
----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20150524/3862ee02/attachment-0001.html>
More information about the Users
mailing list