PVE's RESTful API : posting JSON data

aluciani

New Member
Feb 9, 2012
1
0
1
Hello everyone,

Is it possible to POST data with the parameters given in JSON ?

I develop a ruby on rails web service and active resource, the module in charge of consuming third parties RESTful web services, sends the paramters for REST requests in JSON.

For example, to create a new VM I would send something like the following :

Code:
{"data":{"vmid":"4242"}}

Just like the JSON answers given by PVE.
 
We use CGI.pm to parse request. AFAIK that only supports x-www-form-urlencoded out of the box.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!