Re: [ovirt-users] Help with REST api and json examples

2015-06-23 Thread Scott Miller
Thank you! I'm all set.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Help with REST api and json examples

2015-06-23 Thread Scott Miller
I am unable to POST with json to the REST api. Every attempt is returned with:

{
  message: Request syntactically incorrect. See the description
below for the correct usage:,

From what I can see the syntax should be ok however I am unable to
locate any json examples for the ovirt REST api on github, or in any
ovirt docs.

Can you help me?

Details:

RHEVM 3.5.3.1-1.4.el6ev

Testing app:
Postman


Example requests with only basic needed items to create a VM, both
fail with above syntax error:


POST /api/vms HTTP/1.1
Host: 
Authorization: Basic xxx
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
Postman-Token: 8816bbe9-998e-02b6-1873-f4292657868e


{
vm: {
name: scott_test,
cluster.name: LabRDU,
template.name: CentOS-6.6-RDU
}
}



POST /api/vms HTTP/1.1
Host: x
Authorization: Basic 
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
Postman-Token: 8816bbe9-998e-02b6-1873-f4292657868e


{
vm.name: scott_test,
vm.cluster.name: LabRDU,
vm.template.name: CentOS-6.6-RDU
}
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users