pve rest api: basic examples?

m.ardito

Active Member
Feb 17, 2010
1,473
16
38
Torino, Italy
Hi,

I need to automate some pve operations (eg: rebuild a clone by full cloning another vm), and I am experimenting with pvesh & http.

steps I need are
- stop the existing clone
- delete the existing clone
- clone a vm rebuilding the clone from scratch
- edit cloned vm settings
- start cloned vm

and so on.

using pvesh I can do everything :) no problems, so I know the api command are right.

Using http, with curl & php (or else), I can do most things (I know how to authenticate, get/send the auto ticket, CSRFPreventionToken, and download a spiceproxy conf to open a spice console)

but I ignore how to issue a delete vm or clone command through a URL, how to set parameters, etc.

Is there any basic good guide around, or examples?

Thanks!
Marco
 

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!