I have successfully made API POST requests using curl with a token from root. But as soon as I want to use -script or -prune-backups I get the response:
{"errors":{"prune-backups":"Only root may set this option."},"data":null
This is my curl line:
curl -X POST -H 'Authorization: PVEAPIToken=root@pam!backup=XXXXX' https://192.168.1.120:8006/api2/json//nodes/[NODE]/vzdump --insecure \
-d pool=Backup_weekly \
-d mode=stop \
-d storage=PBSbackup_1 \
-d mailnotification=failure \
-d prune-backups=keep-daily%3D7,keep-weekly%3D3,keep-monthly%3D6
First I created token for root
Than I set the permissions on '/' and role 'Administrator'
Propagation set to true
I changed the token from Priveledged to non-priveleged.
I always get the Only root response. Any clues someone?
{"errors":{"prune-backups":"Only root may set this option."},"data":null
This is my curl line:
curl -X POST -H 'Authorization: PVEAPIToken=root@pam!backup=XXXXX' https://192.168.1.120:8006/api2/json//nodes/[NODE]/vzdump --insecure \
-d pool=Backup_weekly \
-d mode=stop \
-d storage=PBSbackup_1 \
-d mailnotification=failure \
-d prune-backups=keep-daily%3D7,keep-weekly%3D3,keep-monthly%3D6
First I created token for root
Than I set the permissions on '/' and role 'Administrator'
Propagation set to true
I changed the token from Priveledged to non-priveleged.
I always get the Only root response. Any clues someone?