Hi there,
I do not have a degree in computer science nor did I developed web applications for the last 100 years.
So, let's say that proxmox's api - documentation is a quite overwhelming to me.
I found this post in this forum (how to create a lxc container with php)
https://forum.proxmox.com/threads/proxmox-php-api-create-lxc-container.39036/
But this did not helped, because I just do not know where to start.
What I was able to do, was to get some response from the node when sending a request via curl
I get a "TICKET"
So, what now?
How can I use this to start / stop a LXC or a VM?
BTW: My weapons of choice are bash scripts.
I do not have a degree in computer science nor did I developed web applications for the last 100 years.
So, let's say that proxmox's api - documentation is a quite overwhelming to me.
I found this post in this forum (how to create a lxc container with php)
https://forum.proxmox.com/threads/proxmox-php-api-create-lxc-container.39036/
But this did not helped, because I just do not know where to start.
What I was able to do, was to get some response from the node when sending a request via curl
Bash:
curl -k -d 'username=USER@pve' --data-urlencode 'password=PASSWORD' https://NODE_URL:8006/api2/json/access/ticket
I get a "TICKET"
Code:
{"data":
{
"CSRFPreventionToken":"123456:SOME_SHORT_CRYPTICSTRING",
"username":"USERNAME@pve",
"ticket":"PVE:USERNAME@pve:12345556::SOME_VERYLONG_CRYPTICSTRING",
"cap":{"sdn":{},"nodes":{},"storage":{},"dc":{},"access":{},"vms":{"VM.Monitor":1,"VM.PowerMgmt":1
}}}}
So, what now?
How can I use this to start / stop a LXC or a VM?
BTW: My weapons of choice are bash scripts.