[SOLVED] Hello, I have a question about the PVE API interface.

chenym

Member
Oct 25, 2022
50
1
8
I want to call the interface shown in the figure below to pass tag data, but I am prompted that the parameter passed is in an invalid format - the characters in the tag are invalid. I want to know what characters can be passed in the tag field?

1677632555818.png
 
What is the output of "pveversion" ?
How exactly are you building the API request? How exactly you call it? What exact error are you getting?
What does this command return?
Code:
pvesh create /nodes/[node_name]/qemu/[vmid]/config -tags "hello"


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I want to call the interface to pass a standard JSON format data, but I get the following error.1677633816063.png
 
pretty easy to deduct even without looking at the code:
Code:
pvesh create /nodes/proxmox7-nvme1/qemu/2000/config -tags "hello:1"
400 Parameter verification failed.
tags: invalid format - invalid characters in tag

pvesh create <api_path> [OPTIONS] [FORMAT_OPTIONS]
 pvesh create /nodes/proxmox7-nvme1/qemu/2000/config -tags "hello,bye"
update VM 2000: -tags hello,bye
UPIDroxmox7-nvme1:0001B905:003516AC:63FEAA89:qmconfig:2000:root@pam:

root@proxmox7-nvme1:~# qm config 2000
tags: bye;hello

We can then confirm this in the code:
https://github.com/proxmox/pve-common/blob/master/src/PVE/JSONSchema.pm#L706


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Thank you very much for helping me solve the problem.
pretty easy to deduct even without looking at the code:
Code:
pvesh create /nodes/proxmox7-nvme1/qemu/2000/config -tags "hello:1"
400 Parameter verification failed.
tags: invalid format - invalid characters in tag

pvesh create <api_path> [OPTIONS] [FORMAT_OPTIONS]
 pvesh create /nodes/proxmox7-nvme1/qemu/2000/config -tags "hello,bye"
update VM 2000: -tags hello,bye
UPIDroxmox7-nvme1:0001B905:003516AC:63FEAA89:qmconfig:2000:root@pam:

root@proxmox7-nvme1:~# qm config 2000
tags: bye;hello

We can then confirm this in the code:
https://github.com/proxmox/pve-common/blob/master/src/PVE/JSONSchema.pm#L706


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: bbgeek17