Is it possible to add iSCSI targets via Proxmox API?

CheeseRat007

New Member
Apr 25, 2024
15
0
1
Here are the commands to manually discover and attach the iSCSI target in the Proxmox shell.
To discover iSCSI target:
Code:
iscsiadm -m discovery -t sendtargets -p <IP-address>:3260

To attach the iSCSI targets:
Code:
iscsiadm --mode node --targetname <IQN> -p <IP-address> --login

I tried using the API command to attach the iSCSI target, but it did not work: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/scan/iscsi

Is there a way to do this?