[ovirt-users] REST JSON - Request syntactically incorrect

X.Smalbil xander at netbulae.eu
Sun May 24 16:14:22 EDT 2015


Dear all,

Got it solved.…and another skill: able to convert the RSDL’s to json!! Super! Thanks.

POST /api/vms HTTP/1.1
Authorization: Basic YWRtaP5LaO50RKJuYWw6aGFja2VyMTM=
Content-Type: application/json
Accept: application/json
Host: 192.168.3.51
Connection: close
User-Agent: Paw/2.2.1 (Macintosh; OS X/10.10.3) GCDHTTPRequest
Content-Length: 93

{"name":"knallende.ballen","cluster":{"name":"local_cluster"},"template":{"name”:"Blank"}}


On 24 May 2015 at 20:40:06, X.Smalbil (xander at netbulae.eu) wrote:

Dear all,


I’m trying loads of different request bodies to see if I can get the JSON REST to work.

Adding just a name on a new vm request gives me a hint of what to do:

BAD REQUEST:  http://screencloud.net/v/kcp6 (also attached to this mail)

So then I add the next parameter to the request body and try again:

REQUEST INCORRECT: https://screencloud.net/v/hF0l ( also attached to this mail )

I’ve tried:

- {"name":"local.domain.dev.nl","cluster.name":"local_cluster"}
- {“vm.name":"local.domain.dev.nl”,”vm.cluster.name":"local_cluster”}
- {“vm-name":"local.domain.dev.nl”,”vm-cluster-name":"local_cluster”}
- {“action”: {“vm”: {[“name”:”local.domain.dev.nl”,”cluster.name”:”local_cluster”,”template.name”:”Blank”]}}}

……… and load of other combinations. And I’m really getting pretty annoyed :D 


So what should my JSON body actually look like?




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/10c32008/attachment.html>


More information about the Users mailing list