Hi all,
following the guide at https://pve.proxmox.com/wiki/Proxmox_VE_API#Ticket_Cookie I just tried to start my LXC container:
1. Call:
2: Response:
3. Call with new ticket:
4: Response:
What am I doing wrong?
My goal is to only start and stop the container by the API. I'd like to try it with API keys as the next step, but first the basics should work...
PS: This works:
also
following the guide at https://pve.proxmox.com/wiki/Proxmox_VE_API#Ticket_Cookie I just tried to start my LXC container:
1. Call:
Bash:
curl -k -d 'username=api@pve' --data-urlencode "password@/Volumes/Daten/pw.pve" https://pve.lan:8006/api2/json/access/ticket
JSON:
{"data":{"username":"api@pve","cap":{"access":{"User.Modify":1,"Group.Allocate":1},"dc":{"SDN.Use":1,"SDN.Audit":1,"SDN.Allocate":1,"Sys.Audit":1},"storage":{"Datastore.Allocate":1,"Datastore.AllocateTemplate":1,"Datastore.Audit":1,"Datastore.AllocateSpace":1},"nodes":{"Sys.Syslog":1,"Sys.Console":1,"Sys.Audit":1},"sdn":{"SDN.Audit":1,"SDN.Allocate":1,"SDN.Use":1},"vms":{"VM.Monitor":1,"VM.Allocate":1,"VM.Backup":1,"VM.Console":1,"VM.Config.Disk":1,"VM.Config.Memory":1,"VM.Config.CDROM":1,"VM.Snapshot":1,"VM.Config.Network":1,"VM.Config.Options":1,"VM.Clone":1,"VM.Config.Cloudinit":1,"VM.PowerMgmt":1,"VM.Snapshot.Rollback":1,"VM.Config.CPU":1,"VM.Audit":1,"VM.Config.HWType":1,"VM.Migrate":1},"mapping":{"Mapping.Audit":1,"Mapping.Use":1}},"CSRFPreventionToken":"66348398:tFqMoSo153cyKT8nDVJdK7hvMBJWR49O1CKxYw1V82s","ticket":"PVE:api@pve:66348....KXDA=="}}%
Bash:
curl -k -b "PVEAuthCookie=PVE:api@pve:66348....KXDA==" https://pve.lan:8006/api2/json/nodes/pve/lxc/109/status/start
JSON:
{"data":null}%
What am I doing wrong?
My goal is to only start and stop the container by the API. I'd like to try it with API keys as the next step, but first the basics should work...
PS: This works:
Bash:
pvesh create /nodes/pve/lxc/109/status/start
Bash:
curl -k -b "PVEAuthCookie=PVE:api@pve:66348....KXDA==" https://pve.lan:8006/api2/json/nodes/pve/lxc/109/status/current
JSON:
{"data":{"cpu":0,"diskwrite":0,"diskread":0,"maxdisk":34359738368,"status":"stopped","netin":0,"type":"lxc","ha":{"managed":0},"maxswap":536870912,"uptime":0,"netout":0,"cpus":4,"name":"cctv","mem":0,"swap":0,"maxmem":4294967296,"vmid":109,"disk":0}}%
Last edited: