Host Datastore Browser Delete File
Deprecated as of VI API 2.5, use DeleteDatastoreFile_Task.
Deletes the specified files from the datastore.
If a valid virtual disk file is specified, then all the components of the virtual disk are deleted.
Required privileges: Datastore.DeleteFile
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case HostDatastoreBrowser/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
"DeleteFileRequestType Object"
datastorePath
No Content
InvalidDatastore: if the operation cannot be performed on the target datastores. Typically, a specific subclass of this exception is thrown.
FileNotFound: if the file or folder specified by datastorePath is not found.
CannotDeleteFile: if the delete operation on the file fails.
InvalidArgument: if fileInfo is not a valid FileInfo type.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/HostDatastoreBrowser/{moId}/DeleteFile