See below a easy method to manage (upload/download/delete) iso images on a VMWare datacenter datastore using curl.
upload file:
curl -k --user 'mydomain.local\myusername:supersecret' \
--data-binary @./image.iso -X PUT \
"https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"
delete file:
curl -k --user 'mydomain.local\myusername:supersecret' \
-X DELETE \
"https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"
download file:
curl -k --user 'mydomain.local\myusername:supersecret' \
-X GET -o ./image.iso \
"https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"