[feature request]: expand the storage/upload API to support `snippets`

coming.link

New Member
Jul 20, 2026
2
1
3
This is a feature/improvement request.
I am working on a tool that sets up a few templates onto a cluster, each template is meant for automated testing and relies on cloud-init to do all of the early bootstrapping.

Right now, I can issue a `GET` request to the API to see any snippets/images ... etc that I have stored:

Code:
GET /api2/json/nodes/{node}/storage/{storage}/content/

And I get back an array of objects like so:

Code:
[
  <...>
  {'volid': 'local:import/ubuntu-26.04-server-cloudimg-amd64v3.qcow2', 'format': 'qcow2', ... 'content': 'import'},
  {'volid': 'local:snippets/ubuntu-resolute-cloudinit.yaml', ... 'format': 'snippet', 'content': 'snippets'},
  <...>
]


The current API allows me to upload the IMG/qcow2 file for import with an API call like this:


Code:
POST /api2/json/nodes/{node}/storage/{storage}/upload


But there is a limit to what the **required** `content` parameter will take :

`iso | vztmpl | import`

Which means that there is no way for me to use the API to upload the cloud-init yaml snippet.

Which brings me to the ask:

- Update the API so `POST /api2/json/nodes/{node}/storage/{storage}/upload?content=snippet` works and allows me to programmatically upload cloud-init snippets to the cluster
 
  • Like
Reactions: Johannes S
Hi,

I'm using the terraform bgp/proxmox provider to deploy my VMs using cloud-init.yaml to bootstrap the VM. The Provider creates a individual cloud-init.yaml file for each VM and stores it on a desired storage on Proxmox VE. To use this feature i have to configure additional ssh access for terraform to be able to upload the cloud-init.yaml on a desired storage. It would be really helpful if the managements of snippet files via API would be possible.

https://registry.terraform.io/providers/bpg/proxmox/latest/docs#when-is-ssh-required

Thank you!

Regards
Azad
 
To use this feature i have to configure additional ssh access for terraform to be able to upload the cloud-init.yaml on a desired storage. It would be really helpful if the managements of snippet files via API would be possible.

Yep, I have a little script to `scp` the file over to every node in the cluster but the IT overlords do not like us having ssh/root access so that is going to stop working for me soon :(.