Remote API - Change KVM OS

Hello,

I’m trying to change KVM operating system (ex. from Debian to centOS).
Can you provide any kind of guide?
I thought something like

“program=modify-system&json=1&os=kvm-centos6.0-base&host=…”

would do that but I was wrong. Should I empty the system first?

Another thing is that I can run the commands above only as root. By using another user (ex api_user) I get: “You are not allowed to perform the action : Edit system”.
Is there a way to give permissions and fix this?

Any tips are highly appreciated.
Thanks in advance.

Kind regards,

Spyros

hostdog web services

UPDATE

I ended up deleting and re-creating the VPS.
The only problem is that I can not set the IPv6 via the IP to be the same.