Hello, I searched everywhere, even in github search in all repos for samples but I can't find example how to use /api2/json/nodes/{node}/execute.
I'm using API with this simple and easy PHP class: https://github.com/CpuID/pve2-api-php-client. So far every command works OK but not this one in subject.
At http://pve.proxmox.com/pve2-api-doc/ there is required parameter "commands", I'm providing there json encoded array for example:
$params = array(
"commands" =>
json_encode(array(
"/nodes/node1/openvz/101/status/stop",
"/nodes/node1/openvz/101/status/start"
)));
But I get errors:
/nodes/node1/openvz/101/status/stop is not a valid command at /usr/share/perl5/PVE/API2/Nodes.pm line 389
/nodes/node1/openvz/101/status/start is not a valid command at /usr/share/perl5/PVE/API2/Nodes.pm line 389
What should I enter in commands array? Documentation doesn't have any POST examples.
I'm using API with this simple and easy PHP class: https://github.com/CpuID/pve2-api-php-client. So far every command works OK but not this one in subject.
At http://pve.proxmox.com/pve2-api-doc/ there is required parameter "commands", I'm providing there json encoded array for example:
$params = array(
"commands" =>
json_encode(array(
"/nodes/node1/openvz/101/status/stop",
"/nodes/node1/openvz/101/status/start"
)));
But I get errors:
/nodes/node1/openvz/101/status/stop is not a valid command at /usr/share/perl5/PVE/API2/Nodes.pm line 389
/nodes/node1/openvz/101/status/start is not a valid command at /usr/share/perl5/PVE/API2/Nodes.pm line 389
What should I enter in commands array? Documentation doesn't have any POST examples.
Last edited: